Skip to content

Commit bda6ebd

Browse files
authored
Merge pull request #1458 from thapabishwa/feature/env-from
feat: add envFrom support for fluentd daemonset and statefulsets
2 parents 9798273 + 9dd2abf commit bda6ebd

File tree

17 files changed

+241
-3
lines changed

17 files changed

+241
-3
lines changed

apis/fluentbit/v1alpha2/plugins/input/zz_generated.deepcopy.go

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

apis/fluentbit/v1alpha2/plugins/output/kafka_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ type Kafka struct {
4747
// Limit the maximum number of Chunks in the filesystem for the current output logical destination.
4848
TotalLimitSize string `json:"totalLimitSize,omitempty"`
4949
// Enables dedicated thread(s) for this output. Default value is set since version 1.8.13. For previous versions is 0.
50-
Workers *int32 `json:"workers,omitempty"`
50+
Workers *int32 `json:"workers,omitempty"`
5151
}
5252

5353
func (*Kafka) Name() string {

apis/fluentbit/v1alpha2/plugins/output/loki_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ type Loki struct {
6262
// Limit the maximum number of Chunks in the filesystem for the current output logical destination.
6363
TotalLimitSize string `json:"totalLimitSize,omitempty"`
6464
// Enables dedicated thread(s) for this output. Default value is set since version 1.8.13. For previous versions is 0.
65-
Workers *int32 `json:"workers,omitempty"`
65+
Workers *int32 `json:"workers,omitempty"`
6666
}
6767

6868
// implement Section() method

apis/fluentbit/v1alpha2/plugins/output/zz_generated.deepcopy.go

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

apis/fluentd/v1alpha1/fluentd_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ type FluentdSpec struct {
6161
Args []string `json:"args,omitempty"`
6262
// EnvVars represent environment variables that can be passed to fluentd pods.
6363
EnvVars []corev1.EnvVar `json:"envVars,omitempty"`
64+
// EnvFrom represent environment variables that can be passed to fluentd pods directly from secret or configmap
65+
EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`
6466
// FluentdCfgSelector defines the selectors to select the fluentd config CRs.
6567
FluentdCfgSelector metav1.LabelSelector `json:"fluentdCfgSelector,omitempty"`
6668
// Buffer definition

apis/fluentd/v1alpha1/zz_generated.deepcopy.go

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

charts/fluent-operator/charts/fluentd-crds/crds/fluentd.fluent.io_fluentds.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,6 +1781,56 @@ spec:
17811781
description: By default will build the related service according to
17821782
the globalinputs definition.
17831783
type: boolean
1784+
envFrom:
1785+
description: EnvFrom represent environment variables that can be passed
1786+
to fluentd pods directly from secret or configmap
1787+
items:
1788+
description: EnvFromSource represents the source of a set of ConfigMaps
1789+
properties:
1790+
configMapRef:
1791+
description: The ConfigMap to select from
1792+
properties:
1793+
name:
1794+
default: ""
1795+
description: |-
1796+
Name of the referent.
1797+
This field is effectively required, but due to backwards compatibility is
1798+
allowed to be empty. Instances of this type with an empty value here are
1799+
almost certainly wrong.
1800+
TODO: Add other useful fields. apiVersion, kind, uid?
1801+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
1802+
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
1803+
type: string
1804+
optional:
1805+
description: Specify whether the ConfigMap must be defined
1806+
type: boolean
1807+
type: object
1808+
x-kubernetes-map-type: atomic
1809+
prefix:
1810+
description: An optional identifier to prepend to each key in
1811+
the ConfigMap. Must be a C_IDENTIFIER.
1812+
type: string
1813+
secretRef:
1814+
description: The Secret to select from
1815+
properties:
1816+
name:
1817+
default: ""
1818+
description: |-
1819+
Name of the referent.
1820+
This field is effectively required, but due to backwards compatibility is
1821+
allowed to be empty. Instances of this type with an empty value here are
1822+
almost certainly wrong.
1823+
TODO: Add other useful fields. apiVersion, kind, uid?
1824+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
1825+
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
1826+
type: string
1827+
optional:
1828+
description: Specify whether the Secret must be defined
1829+
type: boolean
1830+
type: object
1831+
x-kubernetes-map-type: atomic
1832+
type: object
1833+
type: array
17841834
envVars:
17851835
description: EnvVars represent environment variables that can be passed
17861836
to fluentd pods.

config/crd/bases/fluentd.fluent.io_fluentds.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,6 +1781,56 @@ spec:
17811781
description: By default will build the related service according to
17821782
the globalinputs definition.
17831783
type: boolean
1784+
envFrom:
1785+
description: EnvFrom represent environment variables that can be passed
1786+
to fluentd pods directly from secret or configmap
1787+
items:
1788+
description: EnvFromSource represents the source of a set of ConfigMaps
1789+
properties:
1790+
configMapRef:
1791+
description: The ConfigMap to select from
1792+
properties:
1793+
name:
1794+
default: ""
1795+
description: |-
1796+
Name of the referent.
1797+
This field is effectively required, but due to backwards compatibility is
1798+
allowed to be empty. Instances of this type with an empty value here are
1799+
almost certainly wrong.
1800+
TODO: Add other useful fields. apiVersion, kind, uid?
1801+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
1802+
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
1803+
type: string
1804+
optional:
1805+
description: Specify whether the ConfigMap must be defined
1806+
type: boolean
1807+
type: object
1808+
x-kubernetes-map-type: atomic
1809+
prefix:
1810+
description: An optional identifier to prepend to each key in
1811+
the ConfigMap. Must be a C_IDENTIFIER.
1812+
type: string
1813+
secretRef:
1814+
description: The Secret to select from
1815+
properties:
1816+
name:
1817+
default: ""
1818+
description: |-
1819+
Name of the referent.
1820+
This field is effectively required, but due to backwards compatibility is
1821+
allowed to be empty. Instances of this type with an empty value here are
1822+
almost certainly wrong.
1823+
TODO: Add other useful fields. apiVersion, kind, uid?
1824+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
1825+
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
1826+
type: string
1827+
optional:
1828+
description: Specify whether the Secret must be defined
1829+
type: boolean
1830+
type: object
1831+
x-kubernetes-map-type: atomic
1832+
type: object
1833+
type: array
17841834
envVars:
17851835
description: EnvVars represent environment variables that can be passed
17861836
to fluentd pods.

docs/fluentd.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ FluentdSpec defines the desired state of Fluentd
338338
| image | Fluentd image. | string |
339339
| args | Fluentd Watcher command line arguments. | []string |
340340
| envVars | EnvVars represent environment variables that can be passed to fluentd pods. | [][corev1.EnvVar](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#envvar-v1-core) |
341+
| envFrom | EnvFrom represent environment variables that can be passed to fluentd pods directly from secret or configmap | [][corev1.EnvFromSource](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#envfromsource-v1-core) |
341342
| fluentdCfgSelector | FluentdCfgSelector defines the selectors to select the fluentd config CRs. | [metav1.LabelSelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#labelselector-v1-meta) |
342343
| buffer | Buffer definition | *[BufferVolume](#buffervolume) |
343344
| imagePullPolicy | Fluentd image pull policy. | [corev1.PullPolicy](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#pullpolicy-v1-core) |

docs/plugins/fluentbit/input/tail.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ The Tail input plugin allows to monitor one or several text files. <br /> It has
3535
| storageType | Specify the buffering mechanism to use. It can be memory or filesystem | string |
3636
| pauseOnChunksOverlimit | Specifies if the input plugin should be paused (stop ingesting new data) when the storage.max_chunks_up value is reached. | string |
3737
| skipEmptyLines | Skips empty lines in the log file from any further processing or output. | *bool |
38+
| threaded | Threaded mechanism allows input plugin to run in a separate thread which helps to desaturate the main pipeline. | *string |

0 commit comments

Comments
 (0)