diff --git a/charts/logging-operator/crds/logging.banzaicloud.io_fluentbitagents.yaml b/charts/logging-operator/crds/logging.banzaicloud.io_fluentbitagents.yaml index 0b78eba0c..eb6c7e290 100644 --- a/charts/logging-operator/crds/logging.banzaicloud.io_fluentbitagents.yaml +++ b/charts/logging-operator/crds/logging.banzaicloud.io_fluentbitagents.yaml @@ -1087,6 +1087,12 @@ spec: type: string Use_Kubelet: type: string + kube_meta_namespace_cache_ttl: + type: string + namespace_annotations: + type: string + namespace_labels: + type: string tls.debug: type: string tls.verify: diff --git a/charts/logging-operator/crds/logging.banzaicloud.io_loggings.yaml b/charts/logging-operator/crds/logging.banzaicloud.io_loggings.yaml index 8d86a61f4..60d73a8ea 100644 --- a/charts/logging-operator/crds/logging.banzaicloud.io_loggings.yaml +++ b/charts/logging-operator/crds/logging.banzaicloud.io_loggings.yaml @@ -2104,6 +2104,12 @@ spec: type: string Use_Kubelet: type: string + kube_meta_namespace_cache_ttl: + type: string + namespace_annotations: + type: string + namespace_labels: + type: string tls.debug: type: string tls.verify: @@ -10778,6 +10784,12 @@ spec: type: string Use_Kubelet: type: string + kube_meta_namespace_cache_ttl: + type: string + namespace_annotations: + type: string + namespace_labels: + type: string tls.debug: type: string tls.verify: diff --git a/charts/logging-operator/crds/logging.banzaicloud.io_nodeagents.yaml b/charts/logging-operator/crds/logging.banzaicloud.io_nodeagents.yaml index 9cde73863..548b8b5b2 100644 --- a/charts/logging-operator/crds/logging.banzaicloud.io_nodeagents.yaml +++ b/charts/logging-operator/crds/logging.banzaicloud.io_nodeagents.yaml @@ -3644,6 +3644,12 @@ spec: type: string Use_Kubelet: type: string + kube_meta_namespace_cache_ttl: + type: string + namespace_annotations: + type: string + namespace_labels: + type: string tls.debug: type: string tls.verify: diff --git a/config/crd/bases/logging.banzaicloud.io_fluentbitagents.yaml b/config/crd/bases/logging.banzaicloud.io_fluentbitagents.yaml index 0b78eba0c..eb6c7e290 100644 --- a/config/crd/bases/logging.banzaicloud.io_fluentbitagents.yaml +++ b/config/crd/bases/logging.banzaicloud.io_fluentbitagents.yaml @@ -1087,6 +1087,12 @@ spec: type: string Use_Kubelet: type: string + kube_meta_namespace_cache_ttl: + type: string + namespace_annotations: + type: string + namespace_labels: + type: string tls.debug: type: string tls.verify: diff --git a/config/crd/bases/logging.banzaicloud.io_loggings.yaml b/config/crd/bases/logging.banzaicloud.io_loggings.yaml index 8d86a61f4..60d73a8ea 100644 --- a/config/crd/bases/logging.banzaicloud.io_loggings.yaml +++ b/config/crd/bases/logging.banzaicloud.io_loggings.yaml @@ -2104,6 +2104,12 @@ spec: type: string Use_Kubelet: type: string + kube_meta_namespace_cache_ttl: + type: string + namespace_annotations: + type: string + namespace_labels: + type: string tls.debug: type: string tls.verify: @@ -10778,6 +10784,12 @@ spec: type: string Use_Kubelet: type: string + kube_meta_namespace_cache_ttl: + type: string + namespace_annotations: + type: string + namespace_labels: + type: string tls.debug: type: string tls.verify: diff --git a/config/crd/bases/logging.banzaicloud.io_nodeagents.yaml b/config/crd/bases/logging.banzaicloud.io_nodeagents.yaml index 9cde73863..548b8b5b2 100644 --- a/config/crd/bases/logging.banzaicloud.io_nodeagents.yaml +++ b/config/crd/bases/logging.banzaicloud.io_nodeagents.yaml @@ -3644,6 +3644,12 @@ spec: type: string Use_Kubelet: type: string + kube_meta_namespace_cache_ttl: + type: string + namespace_annotations: + type: string + namespace_labels: + type: string tls.debug: type: string tls.verify: diff --git a/docs/configuration/crds/v1beta1/fluentbit_types.md b/docs/configuration/crds/v1beta1/fluentbit_types.md index f7f1fe4d9..f53dd80c2 100644 --- a/docs/configuration/crds/v1beta1/fluentbit_types.md +++ b/docs/configuration/crds/v1beta1/fluentbit_types.md @@ -698,6 +698,21 @@ Default: On Optional parser name to specify how to parse the data contained in the log key. Recommended use is for developers or testing only. +### namespace_annotations (string, optional) {#filterkubernetes-namespace_annotations} + +Include Kubernetes namespace annotations on every record + + +### kube_meta_namespace_cache_ttl (string, optional) {#filterkubernetes-kube_meta_namespace_cache_ttl} + +Configurable TTL for K8s cached namespace metadata. (15m) + + +### namespace_labels (string, optional) {#filterkubernetes-namespace_labels} + +Include Kubernetes namespace labels on every record + + ### Regex_Parser (string, optional) {#filterkubernetes-regex_parser} Set an alternative Parser to process record Tag and extract pod_name, namespace_name, container_name and docker_id. The parser must be registered in a parsers file (refer to parser filter-kube-test as an example). diff --git a/pkg/sdk/logging/api/v1beta1/fluentbit_types.go b/pkg/sdk/logging/api/v1beta1/fluentbit_types.go index a71a57369..2bcaedd3d 100644 --- a/pkg/sdk/logging/api/v1beta1/fluentbit_types.go +++ b/pkg/sdk/logging/api/v1beta1/fluentbit_types.go @@ -328,6 +328,12 @@ type FilterKubernetes struct { Labels string `json:"Labels,omitempty"` // Include Kubernetes resource annotations in the extra metadata. (default:On) Annotations string `json:"Annotations,omitempty"` + // Include Kubernetes namespace labels on every record + NamespaceLabels string `json:"namespace_labels,omitempty"` + // Include Kubernetes namespace annotations on every record + NamespaceAnnotations string `json:"namespace_annotations,omitempty"` + // Configurable TTL for K8s cached namespace metadata. (15m) + NamespaceCacheTTL string `json:"kube_meta_namespace_cache_ttl,omitempty"` // If set, Kubernetes meta-data can be cached/pre-loaded from files in JSON format in this directory, named as namespace-pod.meta KubeMetaPreloadCacheDir string `json:"Kube_meta_preload_cache_dir,omitempty"` // If set, use dummy-meta data (for test/dev purposes) (default:Off)