Skip to content

Commit 64a7784

Browse files
authored
Merge pull request #186 from wenchajun/svc
use k8s master URL instead of `kubernetes.default.svc `
2 parents 09bfa63 + f8b523a commit 64a7784

File tree

7 files changed

+4435
-3
lines changed

7 files changed

+4435
-3
lines changed

api/fluentbitoperator/v1alpha2/fluentbit_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ type FluentBitSpec struct {
5555
RuntimeClassName string `json:"runtimeClassName,omitempty"`
5656
// PriorityClassName represents the pod's priority class.
5757
PriorityClassName string `json:"priorityClassName,omitempty"`
58+
// List of volumes that can be mounted by containers belonging to the pod.
59+
Volumes []corev1.Volume `json:"volumes,omitempty"`
60+
// Pod volumes to mount into the container's filesystem.
61+
VolumesMounts []corev1.VolumeMount `json:"volumesMounts,omitempty"`
5862
}
5963

6064
// FluentBitStatus defines the observed state of FluentBit

api/fluentbitoperator/v1alpha2/plugins/output/kafka_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ type Kafka struct {
3535
// {property} can be any librdkafka properties
3636
Rdkafka map[string]string `json:"rdkafka,omitempty"`
3737
//adds unknown topics (found in Topic_Key) to Topics. So in Topics only a default topic needs to be configured
38-
DynamicTopic *bool `json:"dynamicTopic,omitempty"`
38+
DynamicTopic *bool `json:"dynamicTopic,omitempty"`
3939
//Fluent Bit queues data into rdkafka library,
4040
//if for some reason the underlying library cannot flush the records the queue might fills up blocking new addition of records.
4141
//The queue_full_retries option set the number of local retries to enqueue the data.
4242
//The default value is 10 times, the interval between each retry is 1 second.
4343
//Setting the queue_full_retries value to 0 set's an unlimited number of retries.
44-
QueueFullRetries *int64 `json:"queueFullRetries,omitempty"`
44+
QueueFullRetries *int64 `json:"queueFullRetries,omitempty"`
4545
}
4646

4747
func (*Kafka) Name() string {

api/fluentbitoperator/v1alpha2/zz_generated.deepcopy.go

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/logging.kubesphere.io_fluentbits.yaml

Lines changed: 1469 additions & 0 deletions
Large diffs are not rendered by default.

manifests/setup/fluentbit-operator-crd.yaml

Lines changed: 1469 additions & 0 deletions
Large diffs are not rendered by default.

manifests/setup/setup.yaml

Lines changed: 1469 additions & 0 deletions
Large diffs are not rendered by default.

pkg/operator/daemonset.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ func MakeDaemonSet(fb v1alpha2.FluentBit, logPath string) appsv1.DaemonSet {
164164
},
165165
},
166166
Env: []corev1.EnvVar{
167-
corev1.EnvVar{
167+
{
168168
Name: "NODE_NAME",
169169
ValueFrom: &corev1.EnvVarSource{
170170
FieldRef: &corev1.ObjectFieldSelector{
@@ -214,6 +214,13 @@ func MakeDaemonSet(fb v1alpha2.FluentBit, logPath string) appsv1.DaemonSet {
214214
ds.Spec.Template.Spec.PriorityClassName = fb.Spec.PriorityClassName
215215
}
216216

217+
if fb.Spec.Volumes != nil {
218+
ds.Spec.Template.Spec.Volumes = append(ds.Spec.Template.Spec.Volumes, fb.Spec.Volumes...)
219+
}
220+
if fb.Spec.VolumesMounts != nil {
221+
ds.Spec.Template.Spec.Containers[0].VolumeMounts = append(ds.Spec.Template.Spec.Containers[0].VolumeMounts, fb.Spec.VolumesMounts...)
222+
}
223+
217224
// Mount Position DB
218225
if fb.Spec.PositionDB != (corev1.VolumeSource{}) {
219226
ds.Spec.Template.Spec.Volumes = append(ds.Spec.Template.Spec.Volumes, corev1.Volume{

0 commit comments

Comments
 (0)