diff --git a/apis/fluentbit/v1alpha2/plugins/parser/regex_types.go b/apis/fluentbit/v1alpha2/plugins/parser/regex_types.go index eb0578172..130831aa1 100644 --- a/apis/fluentbit/v1alpha2/plugins/parser/regex_types.go +++ b/apis/fluentbit/v1alpha2/plugins/parser/regex_types.go @@ -17,8 +17,10 @@ type Regex struct { // Time_Format, eg. %Y-%m-%dT%H:%M:%S %z TimeFormat string `json:"timeFormat,omitempty"` // Time_Keep - TimeKeep *bool `json:"timeKeep,omitempty"` - Types string `json:"types,omitempty"` + TimeKeep *bool `json:"timeKeep,omitempty"` + // Time_Offset, eg. +0200 + TimeOffset string `json:"timeOffset,omitempty"` + Types string `json:"types,omitempty"` } func (_ *Regex) Name() string { @@ -39,6 +41,9 @@ func (re *Regex) Params(_ plugins.SecretLoader) (*params.KVs, error) { if re.TimeKeep != nil { kvs.Insert("Time_Keep", fmt.Sprint(*re.TimeKeep)) } + if re.TimeOffset != "" { + kvs.Insert("Time_Offset", re.TimeOffset) + } if re.Types != "" { kvs.Insert("Types", re.Types) } diff --git a/charts/fluent-operator/crds/fluentbit.fluent.io_clusterparsers.yaml b/charts/fluent-operator/crds/fluentbit.fluent.io_clusterparsers.yaml index 89fe00c12..4fa95639a 100644 --- a/charts/fluent-operator/crds/fluentbit.fluent.io_clusterparsers.yaml +++ b/charts/fluent-operator/crds/fluentbit.fluent.io_clusterparsers.yaml @@ -102,6 +102,9 @@ spec: timeKey: description: Time_Key type: string + timeOffset: + description: Time_Offset, eg. +0200 + type: string types: type: string type: object diff --git a/config/crd/bases/fluentbit.fluent.io_clusterparsers.yaml b/config/crd/bases/fluentbit.fluent.io_clusterparsers.yaml index 89fe00c12..4fa95639a 100644 --- a/config/crd/bases/fluentbit.fluent.io_clusterparsers.yaml +++ b/config/crd/bases/fluentbit.fluent.io_clusterparsers.yaml @@ -102,6 +102,9 @@ spec: timeKey: description: Time_Key type: string + timeOffset: + description: Time_Offset, eg. +0200 + type: string types: type: string type: object diff --git a/docs/plugins/fluentbit/clusterparser/regex.md b/docs/plugins/fluentbit/clusterparser/regex.md index 6629bf0be..89bd68b60 100644 --- a/docs/plugins/fluentbit/clusterparser/regex.md +++ b/docs/plugins/fluentbit/clusterparser/regex.md @@ -9,4 +9,5 @@ The regex parser plugin | timeKey | Time_Key | string | | timeFormat | Time_Format, eg. %Y-%m-%dT%H:%M:%S %z | string | | timeKeep | Time_Keep | *bool | +| timeOffset | Time_Offset eg. +0200 | string | | types | | string | diff --git a/manifests/setup/fluent-operator-crd.yaml b/manifests/setup/fluent-operator-crd.yaml index 26b84e498..cd6dcf390 100644 --- a/manifests/setup/fluent-operator-crd.yaml +++ b/manifests/setup/fluent-operator-crd.yaml @@ -5535,6 +5535,9 @@ spec: timeKey: description: Time_Key type: string + timeOffset: + description: Time_Offset, eg. +0200 + type: string types: type: string type: object diff --git a/manifests/setup/setup.yaml b/manifests/setup/setup.yaml index 6a4d7dbb6..0bc9c1020 100644 --- a/manifests/setup/setup.yaml +++ b/manifests/setup/setup.yaml @@ -5535,6 +5535,9 @@ spec: timeKey: description: Time_Key type: string + timeOffset: + description: Time_Offset, eg. +0200 + type: string types: type: string type: object