From 27c47566375aad26ca05f66306013d1135d7ba62 Mon Sep 17 00:00:00 2001 From: Jean-Yves Date: Fri, 7 Apr 2023 17:02:00 +0200 Subject: [PATCH 01/78] Add influxdb Output Signed-off-by: Jean-Yves --- Makefile | 9 +- .../v1alpha2/plugins/output/influxdb_types.go | 120 ++++++++++++++++++ .../plugins/output/influxdb_types_test.go | 49 +++++++ .../plugins/output/zz_generated.deepcopy.go | 55 ++++++++ go.mod | 7 + go.sum | 15 +++ 6 files changed, 253 insertions(+), 2 deletions(-) create mode 100644 apis/fluentbit/v1alpha2/plugins/output/influxdb_types.go create mode 100644 apis/fluentbit/v1alpha2/plugins/output/influxdb_types_test.go diff --git a/Makefile b/Makefile index b70af9c75..2ecf8999e 100644 --- a/Makefile +++ b/Makefile @@ -150,6 +150,11 @@ CONTROLLER_GEN = $(shell pwd)/bin/controller-gen controller-gen: go-deps ## Download controller-gen locally if necessary. $(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.11.3) +GINKGO = $(shell pwd)/bin/ginkgo +ginkgo: go-deps ## Download controller-gen locally if necessary. + $(call go-get-tool,$(GINKGO),github.com/onsi/ginkgo/ginkgo@v1.16.5) + + KUSTOMIZE = $(shell pwd)/bin/kustomize kustomize: go-deps ## Download kustomize locally if necessary. $(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v5@v5.0.0) @@ -179,10 +184,10 @@ go-deps: # download go dependencies docs-update: # update api docs go run ./cmd/doc-gen/main.go -e2e: # make e2e tests +e2e: ginkgo # make e2e tests chmod a+x tests/scripts/fluentd_e2e.sh && bash tests/scripts/fluentd_e2e.sh -helm-e2e: # make helm e2e tests +helm-e2e: ginkgo # make helm e2e tests chmod a+x tests/scripts/fluentd_helm_e2e.sh && bash tests/scripts/fluentd_helm_e2e.sh update-helm-package: # update helm repo diff --git a/apis/fluentbit/v1alpha2/plugins/output/influxdb_types.go b/apis/fluentbit/v1alpha2/plugins/output/influxdb_types.go new file mode 100644 index 000000000..0f2737ba1 --- /dev/null +++ b/apis/fluentbit/v1alpha2/plugins/output/influxdb_types.go @@ -0,0 +1,120 @@ +package output + +import ( + "fmt" + "strings" + + "github.com/fluent/fluent-operator/v2/apis/fluentbit/v1alpha2/plugins" + "github.com/fluent/fluent-operator/v2/apis/fluentbit/v1alpha2/plugins/params" +) + +// +kubebuilder:object:generate:=true + +// The influxdb output plugin, allows to flush your records into a InfluxDB time series database.
+// **For full documentation, refer to https://docs.fluentbit.io/manual/pipeline/outputs/influxdb** +type InfluxDB struct { + // IP address or hostname of the target InfluxDB service. + // +kubebuilder:validation:Format="hostname" + // +kubebuilder:validation:Format="ipv4" + // +kubebuilder:validation:Format="ipv6" + Host string `json:"host"` + // TCP port of the target InfluxDB service. + // +kubebuilder:validation:Maximum=65536 + // +kubebuilder:validation:Minimum=0 + Port *int32 `json:"port,omitempty"` + // InfluxDB database name where records will be inserted. + Database string `json:"database,omitempty"` + // InfluxDB bucket name where records will be inserted - if specified, database is ignored and v2 of API is used + Bucket string `json:"bucket,omitempty"` + // InfluxDB organization name where the bucket is (v2 only) + Org string `json:"org,omitempty"` + // The name of the tag whose value is incremented for the consecutive simultaneous events. + SequenceTag string `json:"sequenceTag,omitempty"` + // Optional username for HTTP Basic Authentication + HTTPUser *plugins.Secret `json:"httpUser,omitempty"` + // Password for user defined in HTTP_User + HTTPPasswd *plugins.Secret `json:"httpPassword,omitempty"` + // Authentication token used with InfluDB v2 - if specified, both HTTPUser and HTTPPasswd are ignored + HTTPToken *plugins.Secret `json:"httpToken,omitempty"` + // List of keys that needs to be tagged + TagKeys []string `json:"tagKeys,omitempty"` + // Automatically tag keys where value is string. + AutoTags *bool `json:"autoTags,omitempty"` + // Dynamically tag keys which are in the string array at Tags_List_Key key. + TagsListEnabled *bool `json:"tagsListEnabled,omitempty"` + // Key of the string array optionally contained within each log record that contains tag keys for that record + TagsListKey string `json:"tagListKey,omitempty"` + *plugins.TLS `json:"tls,omitempty"` +} + +// Name implement Section() method +func (_ *InfluxDB) Name() string { + return "influxdb" +} + +func (o *InfluxDB) Params(sl plugins.SecretLoader) (*params.KVs, error) { + kvs := params.NewKVs() + // InfluxDB Validation + if o.HTTPToken != nil { + + } + if o.Host != "" { + kvs.Insert("Host", o.Host) + } + if o.Port != nil { + kvs.Insert("Port", fmt.Sprint(*o.Port)) + } + if o.Database != "" { + kvs.Insert("Database", o.Database) + } + if o.Bucket != "" { + kvs.Insert("Bucket", o.Bucket) + } + if o.Org != "" { + kvs.Insert("Org", o.Org) + } + if o.SequenceTag != "" { + kvs.Insert("Sequence_Tag", o.SequenceTag) + } + if o.HTTPUser != nil { + u, err := sl.LoadSecret(*o.HTTPUser) + if err != nil { + return nil, err + } + kvs.Insert("HTTP_User", u) + } + if o.HTTPPasswd != nil { + pwd, err := sl.LoadSecret(*o.HTTPPasswd) + if err != nil { + return nil, err + } + kvs.Insert("HTTP_Passwd", pwd) + } + if o.HTTPToken != nil { + pwd, err := sl.LoadSecret(*o.HTTPToken) + if err != nil { + return nil, err + } + kvs.Insert("HTTP_Token", pwd) + } + if o.TagKeys != nil { + kvs.Insert("Tag_Keys", strings.Join(o.TagKeys, " ")) + } + if o.AutoTags != nil { + kvs.Insert("Auto_Tags", fmt.Sprint(*o.AutoTags)) + } + if o.TagsListEnabled != nil { + kvs.Insert("Tags_List_Enabled", fmt.Sprint(*o.TagsListEnabled)) + } + if o.TagsListKey != "" { + kvs.Insert("Tags_List_Key", o.TagsListKey) + } + if o.TLS != nil { + tls, err := o.TLS.Params(sl) + if err != nil { + return nil, err + } + kvs.Merge(tls) + } + return kvs, nil +} diff --git a/apis/fluentbit/v1alpha2/plugins/output/influxdb_types_test.go b/apis/fluentbit/v1alpha2/plugins/output/influxdb_types_test.go new file mode 100644 index 000000000..c0e925480 --- /dev/null +++ b/apis/fluentbit/v1alpha2/plugins/output/influxdb_types_test.go @@ -0,0 +1,49 @@ +package output + +import ( + "testing" + + "github.com/fluent/fluent-operator/v2/apis/fluentbit/v1alpha2/plugins" + "github.com/fluent/fluent-operator/v2/apis/fluentbit/v1alpha2/plugins/params" + . "github.com/onsi/gomega" +) + +func ptrAny[T any](obj T) *T { + return &obj +} + +func TestOutput_InfluxDB_Params(t *testing.T) { + g := NewGomegaWithT(t) + + sl := plugins.NewSecretLoader(nil, "test namespace") + + dd := InfluxDB{ + Host: "127.0.0.1", + Port: ptrAny(int32(8086)), + Database: "fluentbit", + Bucket: "buck", + Org: "orgnis", + SequenceTag: "_inc", + TagKeys: []string{"foo", "bar", "foo:bar"}, + AutoTags: ptrAny(false), + TagsListEnabled: ptrAny(true), + TagsListKey: "taglist_key", + } + + expected := params.NewKVs() + expected.Insert("Host", "127.0.0.1") + expected.Insert("Port", "8086") + expected.Insert("Database", "fluentbit") + expected.Insert("Bucket", "buck") + expected.Insert("Org", "orgnis") + expected.Insert("Sequence_Tag", "_inc") + expected.Insert("Tag_Keys", "foo bar foo:bar") + expected.Insert("Auto_Tags", "false") + expected.Insert("Tags_List_Enabled", "true") + expected.Insert("Tags_List_Key", "taglist_key") + + kvs, err := dd.Params(sl) + g.Expect(err).NotTo(HaveOccurred()) + g.Expect(kvs).To(Equal(expected)) + +} diff --git a/apis/fluentbit/v1alpha2/plugins/output/zz_generated.deepcopy.go b/apis/fluentbit/v1alpha2/plugins/output/zz_generated.deepcopy.go index 359c9c782..d4a6544f5 100644 --- a/apis/fluentbit/v1alpha2/plugins/output/zz_generated.deepcopy.go +++ b/apis/fluentbit/v1alpha2/plugins/output/zz_generated.deepcopy.go @@ -392,6 +392,61 @@ func (in *HTTP) DeepCopy() *HTTP { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InfluxDB) DeepCopyInto(out *InfluxDB) { + *out = *in + if in.Port != nil { + in, out := &in.Port, &out.Port + *out = new(int32) + **out = **in + } + if in.HTTPUser != nil { + in, out := &in.HTTPUser, &out.HTTPUser + *out = new(plugins.Secret) + (*in).DeepCopyInto(*out) + } + if in.HTTPPasswd != nil { + in, out := &in.HTTPPasswd, &out.HTTPPasswd + *out = new(plugins.Secret) + (*in).DeepCopyInto(*out) + } + if in.HTTPToken != nil { + in, out := &in.HTTPToken, &out.HTTPToken + *out = new(plugins.Secret) + (*in).DeepCopyInto(*out) + } + if in.TagKeys != nil { + in, out := &in.TagKeys, &out.TagKeys + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AutoTags != nil { + in, out := &in.AutoTags, &out.AutoTags + *out = new(bool) + **out = **in + } + if in.TagsListEnabled != nil { + in, out := &in.TagsListEnabled, &out.TagsListEnabled + *out = new(bool) + **out = **in + } + if in.TLS != nil { + in, out := &in.TLS, &out.TLS + *out = new(plugins.TLS) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InfluxDB. +func (in *InfluxDB) DeepCopy() *InfluxDB { + if in == nil { + return nil + } + out := new(InfluxDB) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Kafka) DeepCopyInto(out *Kafka) { *out = *in diff --git a/go.mod b/go.mod index b1594e570..a6cbcc4b8 100644 --- a/go.mod +++ b/go.mod @@ -32,12 +32,14 @@ require ( github.com/go-openapi/jsonpointer v0.19.5 // indirect github.com/go-openapi/jsonreference v0.20.0 // indirect github.com/go-openapi/swag v0.19.14 // indirect + github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/gnostic v0.5.7-v3refs // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/gofuzz v1.1.0 // indirect + github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect github.com/google/uuid v1.1.2 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/josharian/intern v1.0.0 // indirect @@ -48,6 +50,7 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/nxadm/tail v1.4.8 // indirect + github.com/onsi/ginkgo/v2 v2.9.2 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/prometheus/client_golang v1.14.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect @@ -57,12 +60,14 @@ require ( go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.7.0 // indirect go.uber.org/zap v1.24.0 // indirect + golang.org/x/mod v0.9.0 // indirect golang.org/x/net v0.8.0 // indirect golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect golang.org/x/sys v0.6.0 // indirect golang.org/x/term v0.6.0 // indirect golang.org/x/text v0.8.0 // indirect golang.org/x/time v0.3.0 // indirect + golang.org/x/tools v0.7.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.28.1 // indirect @@ -71,7 +76,9 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.26.1 // indirect + k8s.io/code-generator v0.26.1 // indirect k8s.io/component-base v0.26.1 // indirect + k8s.io/gengo v0.0.0-20220902162205-c0856e24416d // indirect k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect diff --git a/go.sum b/go.sum index 9928ec35f..f6e327ec8 100644 --- a/go.sum +++ b/go.sum @@ -89,6 +89,7 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= @@ -108,6 +109,7 @@ github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= @@ -170,6 +172,7 @@ github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -179,6 +182,7 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= @@ -237,6 +241,7 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108 github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.9.2 h1:BA2GMJOtfGAfagzYtrAlufIP0lq6QERkFmHLMLPwFSU= +github.com/onsi/ginkgo/v2 v2.9.2/go.mod h1:WHcJJG2dIlcCqVfBAwUCrJxSPFb6v4azBwgxeMeDuts= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= @@ -345,6 +350,8 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= +golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -499,6 +506,7 @@ golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjs golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -509,6 +517,7 @@ golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -635,8 +644,13 @@ k8s.io/apimachinery v0.26.3 h1:dQx6PNETJ7nODU3XPtrwkfuubs6w7sX0M8n61zHIV/k= k8s.io/apimachinery v0.26.3/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I= k8s.io/client-go v0.26.3 h1:k1UY+KXfkxV2ScEL3gilKcF7761xkYsSD6BC9szIu8s= k8s.io/client-go v0.26.3/go.mod h1:ZPNu9lm8/dbRIPAgteN30RSXea6vrCpFvq+MateTUuQ= +k8s.io/code-generator v0.26.1 h1:dusFDsnNSKlMFYhzIM0jAO1OlnTN5WYwQQ+Ai12IIlo= +k8s.io/code-generator v0.26.1/go.mod h1:OMoJ5Dqx1wgaQzKgc+ZWaZPfGjdRq/Y3WubFrZmeI3I= k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= +k8s.io/gengo v0.0.0-20220902162205-c0856e24416d h1:U9tB195lKdzwqicbJvyJeOXV7Klv+wNAWENRnXEGi08= +k8s.io/gengo v0.0.0-20220902162205-c0856e24416d/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= @@ -652,5 +666,6 @@ sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= From edec16e358ede3c5256befa8254da45cd0b1a916 Mon Sep 17 00:00:00 2001 From: Jean-Yves Date: Fri, 7 Apr 2023 17:10:07 +0200 Subject: [PATCH 02/78] Add InfluxDB to Output Filters Signed-off-by: Jean-Yves --- apis/fluentbit/v1alpha2/clusteroutput_types.go | 3 +++ apis/fluentbit/v1alpha2/plugins/output/influxdb_types.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apis/fluentbit/v1alpha2/clusteroutput_types.go b/apis/fluentbit/v1alpha2/clusteroutput_types.go index 19b913391..b8a138584 100644 --- a/apis/fluentbit/v1alpha2/clusteroutput_types.go +++ b/apis/fluentbit/v1alpha2/clusteroutput_types.go @@ -72,6 +72,8 @@ type OutputSpec struct { Loki *output.Loki `json:"loki,omitempty"` // Syslog defines Syslog Output configuration. Syslog *output.Syslog `json:"syslog,omitempty"` + // InfluxDB defines InfluxDB Output configuration. + InfluxDB *output.InfluxDB `json:"influxDB,omitempty"` // DataDog defines DataDog Output configuration. DataDog *output.DataDog `json:"datadog,omitempty"` // Firehose defines Firehose Output configuration. @@ -86,6 +88,7 @@ type OutputSpec struct { OpenTelemetry *output.OpenTelemetry `json:"opentelemetry,omitempty"` // PrometheusRemoteWrite_types defines Prometheus Remote Write configuration. PrometheusRemoteWrite *output.PrometheusRemoteWrite `json:"prometheusRemoteWrite,omitempty"` + // CustomPlugin defines Custom Output configuration. CustomPlugin *custom.CustomPlugin `json:"customPlugin,omitempty"` } diff --git a/apis/fluentbit/v1alpha2/plugins/output/influxdb_types.go b/apis/fluentbit/v1alpha2/plugins/output/influxdb_types.go index 0f2737ba1..2e8903ca8 100644 --- a/apis/fluentbit/v1alpha2/plugins/output/influxdb_types.go +++ b/apis/fluentbit/v1alpha2/plugins/output/influxdb_types.go @@ -34,7 +34,7 @@ type InfluxDB struct { HTTPUser *plugins.Secret `json:"httpUser,omitempty"` // Password for user defined in HTTP_User HTTPPasswd *plugins.Secret `json:"httpPassword,omitempty"` - // Authentication token used with InfluDB v2 - if specified, both HTTPUser and HTTPPasswd are ignored + // Authentication token used with InfluxDB v2 - if specified, both HTTPUser and HTTPPasswd are ignored HTTPToken *plugins.Secret `json:"httpToken,omitempty"` // List of keys that needs to be tagged TagKeys []string `json:"tagKeys,omitempty"` From c14639929cbec365559d4eec7637319d82fe20b6 Mon Sep 17 00:00:00 2001 From: adiforluls Date: Sun, 9 Apr 2023 00:58:34 +0530 Subject: [PATCH 03/78] fix rewrite_tag match rule and trim start of string pattern Signed-off-by: adiforluls --- controllers/fluentbitconfig_controller.go | 6 ++++++ pkg/utils/utils.go | 1 + 2 files changed, 7 insertions(+) diff --git a/controllers/fluentbitconfig_controller.go b/controllers/fluentbitconfig_controller.go index 93f2b4511..f47121e7d 100644 --- a/controllers/fluentbitconfig_controller.go +++ b/controllers/fluentbitconfig_controller.go @@ -286,6 +286,12 @@ func (r *FluentBitConfigReconciler) generateRewriteTagConfig(cfg fluentbitv1alph continue } tag = input.Spec.Tail.Tag + idx := strings.Index(tag, ".") + if idx == -1 { + tag = "" + } else { + tag = tag[:idx+1] + "*" + } } if tag == "" { return "" diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 188498973..105edb33b 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -50,5 +50,6 @@ func GenerateNamespacedMatchExpr(namespace string, match string) string { } func GenerateNamespacedMatchRegExpr(namespace string, matchRegex string) string { + matchRegex = strings.TrimPrefix(matchRegex, "^") return fmt.Sprintf("^%x\\.%s", md5.Sum([]byte(namespace)), matchRegex) } From a69991d645b55f2a56021f5846145b8b088d39c3 Mon Sep 17 00:00:00 2001 From: Jean-Yves NOLEN Date: Wed, 12 Apr 2023 04:56:19 +0200 Subject: [PATCH 04/78] Fix/missing log level (#691) * release 2.2.0 Signed-off-by: dehaocheng Signed-off-by: Jean-Yves * Add missing Log_Level Signed-off-by: Jean-Yves --------- Signed-off-by: dehaocheng Signed-off-by: Jean-Yves Co-authored-by: dehaocheng --- .../fluentbit/v1alpha2/clusterfilter_types.go | 5 ++ .../v1alpha2/clusterfluentbitconfig_types.go | 2 +- apis/fluentbit/v1alpha2/clusterinput_types.go | 5 ++ .../fluentbit/v1alpha2/clusteroutput_types.go | 7 +++ .../fluentbit.fluent.io_clusterfilters.yaml | 9 ++++ ...bit.fluent.io_clusterfluentbitconfigs.yaml | 1 + .../fluentbit.fluent.io_clusterinputs.yaml | 9 ++++ .../fluentbit.fluent.io_clusteroutputs.yaml | 12 +++++ .../crds/fluentbit.fluent.io_filters.yaml | 9 ++++ .../crds/fluentbit.fluent.io_outputs.yaml | 12 +++++ .../fluentbit.fluent.io_clusterfilters.yaml | 9 ++++ ...bit.fluent.io_clusterfluentbitconfigs.yaml | 1 + .../fluentbit.fluent.io_clusterinputs.yaml | 9 ++++ .../fluentbit.fluent.io_clusteroutputs.yaml | 12 +++++ .../bases/fluentbit.fluent.io_filters.yaml | 9 ++++ .../bases/fluentbit.fluent.io_outputs.yaml | 12 +++++ manifests/setup/fluent-operator-crd.yaml | 52 +++++++++++++++++++ manifests/setup/setup.yaml | 52 +++++++++++++++++++ 18 files changed, 226 insertions(+), 1 deletion(-) diff --git a/apis/fluentbit/v1alpha2/clusterfilter_types.go b/apis/fluentbit/v1alpha2/clusterfilter_types.go index 4cc5ffa56..d9ef6843c 100644 --- a/apis/fluentbit/v1alpha2/clusterfilter_types.go +++ b/apis/fluentbit/v1alpha2/clusterfilter_types.go @@ -40,6 +40,8 @@ type FilterSpec struct { // A regular expression to match against the tags of incoming records. // Use this option if you want to use the full regex syntax. MatchRegex string `json:"matchRegex,omitempty"` + // +kubebuilder:validation:Enum:=off;error;warning;info;debug;trace + LogLevel string `json:"logLevel,omitempty"` // A set of filter plugins in order. FilterItems []FilterItem `json:"filters,omitempty"` } @@ -117,6 +119,9 @@ func (list ClusterFilterList) Load(sl plugins.SecretLoader) (string, error) { if p.Name() != "" { buf.WriteString(fmt.Sprintf(" Name %s\n", p.Name())) } + if item.Spec.LogLevel != "" { + buf.WriteString(fmt.Sprintf(" Log_Level %s\n", item.Spec.LogLevel)) + } if item.Spec.Match != "" { buf.WriteString(fmt.Sprintf(" Match %s\n", item.Spec.Match)) } diff --git a/apis/fluentbit/v1alpha2/clusterfluentbitconfig_types.go b/apis/fluentbit/v1alpha2/clusterfluentbitconfig_types.go index 743852d9c..2740cd9ea 100644 --- a/apis/fluentbit/v1alpha2/clusterfluentbitconfig_types.go +++ b/apis/fluentbit/v1alpha2/clusterfluentbitconfig_types.go @@ -76,7 +76,7 @@ type Service struct { // File to log diagnostic output LogFile string `json:"logFile,omitempty"` // Diagnostic level (error/warning/info/debug/trace) - // +kubebuilder:validation:Enum:=error;warning;info;debug;trace + // +kubebuilder:validation:Enum:=off;error;warning;info;debug;trace LogLevel string `json:"logLevel,omitempty"` // Optional 'parsers' config file (can be multiple) ParsersFile string `json:"parsersFile,omitempty"` diff --git a/apis/fluentbit/v1alpha2/clusterinput_types.go b/apis/fluentbit/v1alpha2/clusterinput_types.go index b234d62a7..7112a2e69 100644 --- a/apis/fluentbit/v1alpha2/clusterinput_types.go +++ b/apis/fluentbit/v1alpha2/clusterinput_types.go @@ -37,6 +37,8 @@ type InputSpec struct { // A user friendly alias name for this input plugin. // Used in metrics for distinction of each configured input. Alias string `json:"alias,omitempty"` + // +kubebuilder:validation:Enum:=off;error;warning;info;debug;trace + LogLevel string `json:"logLevel,omitempty"` // Dummy defines Dummy Input configuration. Dummy *input.Dummy `json:"dummy,omitempty"` // Tail defines Tail Input configuration. @@ -101,6 +103,9 @@ func (list ClusterInputList) Load(sl plugins.SecretLoader) (string, error) { if item.Spec.Alias != "" { buf.WriteString(fmt.Sprintf(" Alias %s\n", item.Spec.Alias)) } + if item.Spec.LogLevel != "" { + buf.WriteString(fmt.Sprintf(" Log_Level %s\n", item.Spec.LogLevel)) + } kvs, err := p.Params(sl) if err != nil { return err diff --git a/apis/fluentbit/v1alpha2/clusteroutput_types.go b/apis/fluentbit/v1alpha2/clusteroutput_types.go index b8a138584..1d2e30d81 100644 --- a/apis/fluentbit/v1alpha2/clusteroutput_types.go +++ b/apis/fluentbit/v1alpha2/clusteroutput_types.go @@ -43,6 +43,10 @@ type OutputSpec struct { // A user friendly alias name for this output plugin. // Used in metrics for distinction of each configured output. Alias string `json:"alias,omitempty"` + // Set the plugin's logging verbosity level. Allowed values are: off, error, warn, info, debug and trace, Defaults to the SERVICE section's Log_Level + // +kubebuilder:validation:Enum:=off;error;warning;info;debug;trace + LogLevel string `json:"logLevel,omitempty"` + // AzureBlob defines AzureBlob Output Configuration AzureBlob *output.AzureBlob `json:"azureBlob,omitempty"` // AzureLogAnalytics defines AzureLogAnalytics Output Configuration @@ -142,6 +146,9 @@ func (list ClusterOutputList) Load(sl plugins.SecretLoader) (string, error) { if item.Spec.Match != "" { buf.WriteString(fmt.Sprintf(" Match %s\n", item.Spec.Match)) } + if item.Spec.LogLevel != "" { + buf.WriteString(fmt.Sprintf(" Log_Level %s\n", item.Spec.LogLevel)) + } if item.Spec.MatchRegex != "" { buf.WriteString(fmt.Sprintf(" Match_Regex %s\n", item.Spec.MatchRegex)) } diff --git a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterfilters.yaml b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterfilters.yaml index 647cdfefe..38064b4a6 100644 --- a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterfilters.yaml +++ b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterfilters.yaml @@ -703,6 +703,15 @@ spec: type: object type: object type: array + logLevel: + enum: + - "off" + - error + - warning + - info + - debug + - trace + type: string match: description: A pattern to match against the tags of incoming records. It's case-sensitive and support the star (*) character as a wildcard. diff --git a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterfluentbitconfigs.yaml b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterfluentbitconfigs.yaml index cffdbe35f..43c89effe 100644 --- a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterfluentbitconfigs.yaml +++ b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterfluentbitconfigs.yaml @@ -287,6 +287,7 @@ spec: logLevel: description: Diagnostic level (error/warning/info/debug/trace) enum: + - "off" - error - warning - info diff --git a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterinputs.yaml b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterinputs.yaml index d76be3455..fdf86612b 100644 --- a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterinputs.yaml +++ b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterinputs.yaml @@ -80,6 +80,15 @@ spec: tag: type: string type: object + logLevel: + enum: + - "off" + - error + - warning + - info + - debug + - trace + type: string nodeExporterMetrics: description: NodeExporterMetrics defines Node Exporter Metrics Input configuration. diff --git a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml index d40d3dc2d..b35ee1b7b 100644 --- a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml +++ b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml @@ -1098,6 +1098,18 @@ spec: will be used. type: string type: object + logLevel: + description: 'Set the plugin''s logging verbosity level. Allowed values + are: off, error, warn, info, debug and trace, Defaults to the SERVICE + section''s Log_Level' + enum: + - "off" + - error + - warning + - info + - debug + - trace + type: string loki: description: Loki defines Loki Output configuration. properties: diff --git a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_filters.yaml b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_filters.yaml index 46bc7ef73..f84c8b4d2 100644 --- a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_filters.yaml +++ b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_filters.yaml @@ -703,6 +703,15 @@ spec: type: object type: object type: array + logLevel: + enum: + - "off" + - error + - warning + - info + - debug + - trace + type: string match: description: A pattern to match against the tags of incoming records. It's case-sensitive and support the star (*) character as a wildcard. diff --git a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml index 9b2b0e6b6..1f10d256f 100644 --- a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml +++ b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml @@ -1098,6 +1098,18 @@ spec: will be used. type: string type: object + logLevel: + description: 'Set the plugin''s logging verbosity level. Allowed values + are: off, error, warn, info, debug and trace, Defaults to the SERVICE + section''s Log_Level' + enum: + - "off" + - error + - warning + - info + - debug + - trace + type: string loki: description: Loki defines Loki Output configuration. properties: diff --git a/config/crd/bases/fluentbit.fluent.io_clusterfilters.yaml b/config/crd/bases/fluentbit.fluent.io_clusterfilters.yaml index 647cdfefe..38064b4a6 100644 --- a/config/crd/bases/fluentbit.fluent.io_clusterfilters.yaml +++ b/config/crd/bases/fluentbit.fluent.io_clusterfilters.yaml @@ -703,6 +703,15 @@ spec: type: object type: object type: array + logLevel: + enum: + - "off" + - error + - warning + - info + - debug + - trace + type: string match: description: A pattern to match against the tags of incoming records. It's case-sensitive and support the star (*) character as a wildcard. diff --git a/config/crd/bases/fluentbit.fluent.io_clusterfluentbitconfigs.yaml b/config/crd/bases/fluentbit.fluent.io_clusterfluentbitconfigs.yaml index cffdbe35f..43c89effe 100644 --- a/config/crd/bases/fluentbit.fluent.io_clusterfluentbitconfigs.yaml +++ b/config/crd/bases/fluentbit.fluent.io_clusterfluentbitconfigs.yaml @@ -287,6 +287,7 @@ spec: logLevel: description: Diagnostic level (error/warning/info/debug/trace) enum: + - "off" - error - warning - info diff --git a/config/crd/bases/fluentbit.fluent.io_clusterinputs.yaml b/config/crd/bases/fluentbit.fluent.io_clusterinputs.yaml index d76be3455..fdf86612b 100644 --- a/config/crd/bases/fluentbit.fluent.io_clusterinputs.yaml +++ b/config/crd/bases/fluentbit.fluent.io_clusterinputs.yaml @@ -80,6 +80,15 @@ spec: tag: type: string type: object + logLevel: + enum: + - "off" + - error + - warning + - info + - debug + - trace + type: string nodeExporterMetrics: description: NodeExporterMetrics defines Node Exporter Metrics Input configuration. diff --git a/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml b/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml index d40d3dc2d..b35ee1b7b 100644 --- a/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml +++ b/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml @@ -1098,6 +1098,18 @@ spec: will be used. type: string type: object + logLevel: + description: 'Set the plugin''s logging verbosity level. Allowed values + are: off, error, warn, info, debug and trace, Defaults to the SERVICE + section''s Log_Level' + enum: + - "off" + - error + - warning + - info + - debug + - trace + type: string loki: description: Loki defines Loki Output configuration. properties: diff --git a/config/crd/bases/fluentbit.fluent.io_filters.yaml b/config/crd/bases/fluentbit.fluent.io_filters.yaml index 46bc7ef73..f84c8b4d2 100644 --- a/config/crd/bases/fluentbit.fluent.io_filters.yaml +++ b/config/crd/bases/fluentbit.fluent.io_filters.yaml @@ -703,6 +703,15 @@ spec: type: object type: object type: array + logLevel: + enum: + - "off" + - error + - warning + - info + - debug + - trace + type: string match: description: A pattern to match against the tags of incoming records. It's case-sensitive and support the star (*) character as a wildcard. diff --git a/config/crd/bases/fluentbit.fluent.io_outputs.yaml b/config/crd/bases/fluentbit.fluent.io_outputs.yaml index 9b2b0e6b6..1f10d256f 100644 --- a/config/crd/bases/fluentbit.fluent.io_outputs.yaml +++ b/config/crd/bases/fluentbit.fluent.io_outputs.yaml @@ -1098,6 +1098,18 @@ spec: will be used. type: string type: object + logLevel: + description: 'Set the plugin''s logging verbosity level. Allowed values + are: off, error, warn, info, debug and trace, Defaults to the SERVICE + section''s Log_Level' + enum: + - "off" + - error + - warning + - info + - debug + - trace + type: string loki: description: Loki defines Loki Output configuration. properties: diff --git a/manifests/setup/fluent-operator-crd.yaml b/manifests/setup/fluent-operator-crd.yaml index a2842c895..bf089e808 100644 --- a/manifests/setup/fluent-operator-crd.yaml +++ b/manifests/setup/fluent-operator-crd.yaml @@ -701,6 +701,15 @@ spec: type: object type: object type: array + logLevel: + enum: + - "off" + - error + - warning + - info + - debug + - trace + type: string match: description: A pattern to match against the tags of incoming records. It's case-sensitive and support the star (*) character as a wildcard. @@ -1440,6 +1449,7 @@ spec: logLevel: description: Diagnostic level (error/warning/info/debug/trace) enum: + - "off" - error - warning - info @@ -1717,6 +1727,15 @@ spec: tag: type: string type: object + logLevel: + enum: + - "off" + - error + - warning + - info + - debug + - trace + type: string nodeExporterMetrics: description: NodeExporterMetrics defines Node Exporter Metrics Input configuration. @@ -3089,6 +3108,18 @@ spec: will be used. type: string type: object + logLevel: + description: 'Set the plugin''s logging verbosity level. Allowed values + are: off, error, warn, info, debug and trace, Defaults to the SERVICE + section''s Log_Level' + enum: + - "off" + - error + - warning + - info + - debug + - trace + type: string loki: description: Loki defines Loki Output configuration. properties: @@ -10227,6 +10258,15 @@ spec: type: object type: object type: array + logLevel: + enum: + - "off" + - error + - warning + - info + - debug + - trace + type: string match: description: A pattern to match against the tags of incoming records. It's case-sensitive and support the star (*) character as a wildcard. @@ -22350,6 +22390,18 @@ spec: will be used. type: string type: object + logLevel: + description: 'Set the plugin''s logging verbosity level. Allowed values + are: off, error, warn, info, debug and trace, Defaults to the SERVICE + section''s Log_Level' + enum: + - "off" + - error + - warning + - info + - debug + - trace + type: string loki: description: Loki defines Loki Output configuration. properties: diff --git a/manifests/setup/setup.yaml b/manifests/setup/setup.yaml index db33e08e3..39b27fcee 100644 --- a/manifests/setup/setup.yaml +++ b/manifests/setup/setup.yaml @@ -701,6 +701,15 @@ spec: type: object type: object type: array + logLevel: + enum: + - "off" + - error + - warning + - info + - debug + - trace + type: string match: description: A pattern to match against the tags of incoming records. It's case-sensitive and support the star (*) character as a wildcard. @@ -1440,6 +1449,7 @@ spec: logLevel: description: Diagnostic level (error/warning/info/debug/trace) enum: + - "off" - error - warning - info @@ -1717,6 +1727,15 @@ spec: tag: type: string type: object + logLevel: + enum: + - "off" + - error + - warning + - info + - debug + - trace + type: string nodeExporterMetrics: description: NodeExporterMetrics defines Node Exporter Metrics Input configuration. @@ -3089,6 +3108,18 @@ spec: will be used. type: string type: object + logLevel: + description: 'Set the plugin''s logging verbosity level. Allowed values + are: off, error, warn, info, debug and trace, Defaults to the SERVICE + section''s Log_Level' + enum: + - "off" + - error + - warning + - info + - debug + - trace + type: string loki: description: Loki defines Loki Output configuration. properties: @@ -10227,6 +10258,15 @@ spec: type: object type: object type: array + logLevel: + enum: + - "off" + - error + - warning + - info + - debug + - trace + type: string match: description: A pattern to match against the tags of incoming records. It's case-sensitive and support the star (*) character as a wildcard. @@ -22350,6 +22390,18 @@ spec: will be used. type: string type: object + logLevel: + description: 'Set the plugin''s logging verbosity level. Allowed values + are: off, error, warn, info, debug and trace, Defaults to the SERVICE + section''s Log_Level' + enum: + - "off" + - error + - warning + - info + - debug + - trace + type: string loki: description: Loki defines Loki Output configuration. properties: From a6ecadf59d4e45c886369d5b2e70c326abb37b3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Nov=C3=A1k?= Date: Wed, 12 Apr 2023 13:35:43 +0000 Subject: [PATCH 05/78] Add EnvVars support to FluentD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomáš Novák --- apis/fluentd/v1alpha1/fluentd_types.go | 2 + .../fluentd/v1alpha1/zz_generated.deepcopy.go | 7 ++ .../crds/fluentd.fluent.io_fluentds.yaml | 110 ++++++++++++++++++ .../crd/bases/fluentd.fluent.io_fluentds.yaml | 110 ++++++++++++++++++ docs/fluentd.md | 1 + pkg/operator/sts.go | 4 + 6 files changed, 234 insertions(+) diff --git a/apis/fluentd/v1alpha1/fluentd_types.go b/apis/fluentd/v1alpha1/fluentd_types.go index 0232a3070..3a6895e8b 100644 --- a/apis/fluentd/v1alpha1/fluentd_types.go +++ b/apis/fluentd/v1alpha1/fluentd_types.go @@ -46,6 +46,8 @@ type FluentdSpec struct { Image string `json:"image,omitempty"` // Fluentd Watcher command line arguments. Args []string `json:"args,omitempty"` + // EnvVars represent environment variables that can be passed to fluentd pods. + EnvVars []corev1.EnvVar `json:"envVars,omitempty"` // FluentdCfgSelector defines the selectors to select the fluentd config CRs. FluentdCfgSelector metav1.LabelSelector `json:"fluentdCfgSelector,omitempty"` // Buffer definition diff --git a/apis/fluentd/v1alpha1/zz_generated.deepcopy.go b/apis/fluentd/v1alpha1/zz_generated.deepcopy.go index d4195a81e..10fa41657 100644 --- a/apis/fluentd/v1alpha1/zz_generated.deepcopy.go +++ b/apis/fluentd/v1alpha1/zz_generated.deepcopy.go @@ -709,6 +709,13 @@ func (in *FluentdSpec) DeepCopyInto(out *FluentdSpec) { *out = make([]string, len(*in)) copy(*out, *in) } + if in.EnvVars != nil { + in, out := &in.EnvVars, &out.EnvVars + *out = make([]corev1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } in.FluentdCfgSelector.DeepCopyInto(&out.FluentdCfgSelector) if in.BufferVolume != nil { in, out := &in.BufferVolume, &out.BufferVolume diff --git a/charts/fluent-operator/charts/fluentd-crds/crds/fluentd.fluent.io_fluentds.yaml b/charts/fluent-operator/charts/fluentd-crds/crds/fluentd.fluent.io_fluentds.yaml index 972055ed4..46be7bca3 100644 --- a/charts/fluent-operator/charts/fluentd-crds/crds/fluentd.fluent.io_fluentds.yaml +++ b/charts/fluent-operator/charts/fluentd-crds/crds/fluentd.fluent.io_fluentds.yaml @@ -870,6 +870,116 @@ spec: items: type: string type: array + envVars: + description: EnvVars represent environment variables that can be passed + to fluentd pods. + items: + description: EnvVar represents an environment variable present in + a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using + the previously defined environment variables in the container + and any service environment variables. If a variable cannot + be resolved, the reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the + string literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists or + not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot + be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array buffer: description: Buffer definition properties: diff --git a/config/crd/bases/fluentd.fluent.io_fluentds.yaml b/config/crd/bases/fluentd.fluent.io_fluentds.yaml index 972055ed4..46be7bca3 100644 --- a/config/crd/bases/fluentd.fluent.io_fluentds.yaml +++ b/config/crd/bases/fluentd.fluent.io_fluentds.yaml @@ -870,6 +870,116 @@ spec: items: type: string type: array + envVars: + description: EnvVars represent environment variables that can be passed + to fluentd pods. + items: + description: EnvVar represents an environment variable present in + a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using + the previously defined environment variables in the container + and any service environment variables. If a variable cannot + be resolved, the reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the + string literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists or + not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot + be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array buffer: description: Buffer definition properties: diff --git a/docs/fluentd.md b/docs/fluentd.md index 03043bad2..a212a0170 100644 --- a/docs/fluentd.md +++ b/docs/fluentd.md @@ -291,6 +291,7 @@ FluentdSpec defines the desired state of Fluentd | workers | Numbers of the workers in Fluentd instance | *int32 | | image | Fluentd image. | string | | args | Fluentd Watcher command line arguments. | []string | +| envVars | EnvVars represent environment variables that can be passed to fluentd pods. | []corev1.EnvVar | | fluentdCfgSelector | FluentdCfgSelector defines the selectors to select the fluentd config CRs. | [metav1.LabelSelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#labelselector-v1-meta) | | buffer | Buffer definition | *BufferVolume | | imagePullPolicy | Fluentd image pull policy. | corev1.PullPolicy | diff --git a/pkg/operator/sts.go b/pkg/operator/sts.go index 4ff99c02b..b74829d0d 100644 --- a/pkg/operator/sts.go +++ b/pkg/operator/sts.go @@ -132,6 +132,10 @@ func MakeStatefulset(fd fluentdv1alpha1.Fluentd) *appsv1.StatefulSet { sts.Spec.VolumeClaimTemplates = append(sts.Spec.VolumeClaimTemplates, fd.Spec.VolumeClaimTemplates...) } + if fd.Spec.EnvVars != nil { + sts.Spec.Template.Spec.Containers[0].Env = append(sts.Spec.Template.Spec.Containers[0].Env, fd.Spec.EnvVars...) + } + // Mount host or emptydir VolumeSource if fd.Spec.BufferVolume != nil && !fd.Spec.BufferVolume.DisableBufferVolume { bufferVolName := fmt.Sprintf("%s-buffer", fd.Name) From 34a1bfe3f50ab0c2a7bdce534d1d1124c4bc551f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Nov=C3=A1k?= Date: Wed, 12 Apr 2023 14:01:45 +0000 Subject: [PATCH 06/78] Add Pod Annotations support to FluentD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomáš Novák --- apis/fluentd/v1alpha1/fluentd_types.go | 2 ++ apis/fluentd/v1alpha1/zz_generated.deepcopy.go | 7 +++++++ .../crds/fluentd.fluent.io_fluentds.yaml | 5 +++++ config/crd/bases/fluentd.fluent.io_fluentds.yaml | 5 +++++ docs/fluentd.md | 1 + pkg/operator/sts.go | 14 ++++++++------ 6 files changed, 28 insertions(+), 6 deletions(-) diff --git a/apis/fluentd/v1alpha1/fluentd_types.go b/apis/fluentd/v1alpha1/fluentd_types.go index 0232a3070..86d88354e 100644 --- a/apis/fluentd/v1alpha1/fluentd_types.go +++ b/apis/fluentd/v1alpha1/fluentd_types.go @@ -58,6 +58,8 @@ type FluentdSpec struct { Resources corev1.ResourceRequirements `json:"resources,omitempty"` // NodeSelector NodeSelector map[string]string `json:"nodeSelector,omitempty"` + // Annotations to add to each Fluentd pod. + Annotations map[string]string `json:"annotations,omitempty"` // Annotations to add to the Fluentd service account ServiceAccountAnnotations map[string]string `json:"serviceAccountAnnotations,omitempty"` // Pod's scheduling constraints. diff --git a/apis/fluentd/v1alpha1/zz_generated.deepcopy.go b/apis/fluentd/v1alpha1/zz_generated.deepcopy.go index d4195a81e..a4154fb0c 100644 --- a/apis/fluentd/v1alpha1/zz_generated.deepcopy.go +++ b/apis/fluentd/v1alpha1/zz_generated.deepcopy.go @@ -728,6 +728,13 @@ func (in *FluentdSpec) DeepCopyInto(out *FluentdSpec) { (*out)[key] = val } } + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } if in.ServiceAccountAnnotations != nil { in, out := &in.ServiceAccountAnnotations, &out.ServiceAccountAnnotations *out = make(map[string]string, len(*in)) diff --git a/charts/fluent-operator/charts/fluentd-crds/crds/fluentd.fluent.io_fluentds.yaml b/charts/fluent-operator/charts/fluentd-crds/crds/fluentd.fluent.io_fluentds.yaml index 972055ed4..3e7da0a17 100644 --- a/charts/fluent-operator/charts/fluentd-crds/crds/fluentd.fluent.io_fluentds.yaml +++ b/charts/fluent-operator/charts/fluentd-crds/crds/fluentd.fluent.io_fluentds.yaml @@ -865,6 +865,11 @@ spec: type: array type: object type: object + annotations: + additionalProperties: + type: string + description: Annotations to add to each Fluentd pod. + type: objects args: description: Fluentd Watcher command line arguments. items: diff --git a/config/crd/bases/fluentd.fluent.io_fluentds.yaml b/config/crd/bases/fluentd.fluent.io_fluentds.yaml index 972055ed4..710c7629e 100644 --- a/config/crd/bases/fluentd.fluent.io_fluentds.yaml +++ b/config/crd/bases/fluentd.fluent.io_fluentds.yaml @@ -865,6 +865,11 @@ spec: type: array type: object type: object + annotations: + additionalProperties: + type: string + description: Annotations to add to each Fluentd pod. + type: object args: description: Fluentd Watcher command line arguments. items: diff --git a/docs/fluentd.md b/docs/fluentd.md index 03043bad2..daf3c7f4a 100644 --- a/docs/fluentd.md +++ b/docs/fluentd.md @@ -297,6 +297,7 @@ FluentdSpec defines the desired state of Fluentd | imagePullSecrets | Fluentd image pull secret | []corev1.LocalObjectReference | | resources | Compute Resources required by container. | corev1.ResourceRequirements | | nodeSelector | NodeSelector | map[string]string | +| annotations | Annotations to add to each Fluentd pod. | map[string]string | | serviceAccountAnnotations | Annotations to add to the Fluentd service account | map[string]string | | affinity | Pod's scheduling constraints. | *corev1.Affinity | | tolerations | Tolerations | [][corev1.Toleration](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#toleration-v1-core) | diff --git a/pkg/operator/sts.go b/pkg/operator/sts.go index 4ff99c02b..7d3c82c3a 100644 --- a/pkg/operator/sts.go +++ b/pkg/operator/sts.go @@ -53,9 +53,10 @@ func MakeStatefulset(fd fluentdv1alpha1.Fluentd) *appsv1.StatefulSet { sts := appsv1.StatefulSet{ ObjectMeta: metav1.ObjectMeta{ - Name: fd.Name, - Namespace: fd.Namespace, - Labels: labels, + Name: fd.Name, + Namespace: fd.Namespace, + Labels: labels, + Annotations: fd.Annotations, }, Spec: appsv1.StatefulSetSpec{ Replicas: &replicas, @@ -64,9 +65,10 @@ func MakeStatefulset(fd fluentdv1alpha1.Fluentd) *appsv1.StatefulSet { }, Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ - Name: fd.Name, - Namespace: fd.Namespace, - Labels: labels, + Name: fd.Name, + Namespace: fd.Namespace, + Labels: labels, + Annotations: fd.Spec.Annotations, }, Spec: corev1.PodSpec{ ServiceAccountName: fd.Name, From 3a0da3dc01cf2cbba6744371099dd45a973df9c8 Mon Sep 17 00:00:00 2001 From: flxman Date: Wed, 26 Apr 2023 16:34:49 +0200 Subject: [PATCH 07/78] fluent operator & fluentbit: Added tolerations, nodeSelector + more (#704) * Added tolerations, nodeSelector, priorityClassName Signed-off-by: flxman * Added podSecurityContext for fluent-operator Signed-off-by: illrill * Different style of indentation Signed-off-by: illrill --------- Signed-off-by: flxman Signed-off-by: illrill Co-authored-by: illrill --- .../templates/fluent-operator-deployment.yaml | 17 +++++++++++++++- .../templates/fluentbit-fluentBit.yaml | 13 ++++++++++-- charts/fluent-operator/values.yaml | 20 ++++++++++++++++--- 3 files changed, 44 insertions(+), 6 deletions(-) diff --git a/charts/fluent-operator/templates/fluent-operator-deployment.yaml b/charts/fluent-operator/templates/fluent-operator-deployment.yaml index 470ac3d48..bca4c2a83 100644 --- a/charts/fluent-operator/templates/fluent-operator-deployment.yaml +++ b/charts/fluent-operator/templates/fluent-operator-deployment.yaml @@ -95,7 +95,22 @@ spec: - name: env mountPath: /fluent-operator serviceAccountName: fluent-operator + {{- if .Values.operator.priorityClassName }} + priorityClassName: {{ .Values.operator.priorityClassName | quote }} + {{- end }} {{- if .Values.operator.imagePullSecrets }} imagePullSecrets: - {{- toYaml .Values.operator.imagePullSecrets | nindent 8 }} + {{ toYaml .Values.operator.imagePullSecrets | nindent 8 }} + {{- end }} + {{- if .Values.operator.tolerations }} + tolerations: + {{ toYaml .Values.operator.tolerations | nindent 8 }} + {{- end }} + {{- if .Values.operator.nodeSelector }} + nodeSelector: + {{ toYaml .Values.operator.nodeSelector | nindent 8 }} + {{- end }} + {{- if .Values.operator.podSecurityContext }} + podSecurityContext: + {{ toYaml .Values.operator.podSecurityContext | nindent 8 }} {{- end }} diff --git a/charts/fluent-operator/templates/fluentbit-fluentBit.yaml b/charts/fluent-operator/templates/fluentbit-fluentBit.yaml index 10d2b19ee..6f03e229e 100644 --- a/charts/fluent-operator/templates/fluentbit-fluentBit.yaml +++ b/charts/fluent-operator/templates/fluentbit-fluentBit.yaml @@ -18,8 +18,17 @@ spec: resources: {{- toYaml .Values.fluentbit.resources | nindent 4 }} fluentBitConfigName: fluent-bit-config +{{- with .Values.fluentbit.tolerations }} tolerations: - - operator: Exists +{{ toYaml . | indent 4 }} +{{- end }} +{{- with .Values.fluentbit.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 4 }} +{{- end }} +{{- if .Values.fluentbit.priorityClassName }} + priorityClassName: {{ .Values.fluentbit.priorityClassName | quote }} +{{- end }} affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: @@ -53,4 +62,4 @@ spec: {{ toYaml .Values.fluentbit.labels | indent 4 }} {{- end }} {{- end }} -{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/fluent-operator/values.yaml b/charts/fluent-operator/values.yaml index 86cb1669d..8b695689c 100644 --- a/charts/fluent-operator/values.yaml +++ b/charts/fluent-operator/values.yaml @@ -17,7 +17,15 @@ operator: container: repository: "kubesphere/fluent-operator" tag: "latest" - # FluentBit operator resources. Usually user needn't to adjust these. + # nodeSelector configuration for Fluent Operator. Ref: https://kubernetes.io/docs/user-guide/node-selection/ + nodeSelector: {} + # Node tolerations applied to Fluent Operator. Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + tolerations: [] + # Priority class applied to Fluent Operator. Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass + priorityClassName: "" + # Pod security context for Fluent Operator. Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + podSecurityContext: {} + # Fluent Operator resources. Usually user needn't to adjust these. resources: limits: cpu: 100m @@ -83,7 +91,13 @@ fluentbit: additionalVolumes: [] # Pod volumes to mount into the container's filesystem. additionalVolumesMounts: [] - + # nodeSelector configuration for Fluent Bit pods. Ref: https://kubernetes.io/docs/user-guide/node-selection/ + nodeSelector: {} + # Node tolerations applied to Fluent Bit pods. Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + tolerations: + - operator: Exists + # Priority Class applied to Fluent Bit pods. Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass + priorityClassName: "" # Remove the above empty volumes and volumesMounts, and then set additionalVolumes and additionalVolumesMounts as below if you want to collect node exporter metrics # additionalVolumes: # - name: hostProc @@ -234,4 +248,4 @@ fluentd: nameOverride: "" fullnameOverride: "" -namespaceOverride: "" +namespaceOverride: "" \ No newline at end of file From 31c63a649440b5fb632a478b217c8b15b421b583 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 Apr 2023 22:35:31 +0800 Subject: [PATCH 08/78] build(deps): Bump k8s.io/apimachinery from 0.26.3 to 0.27.1 (#701) Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.26.3 to 0.27.1. - [Release notes](https://github.com/kubernetes/apimachinery/releases) - [Commits](https://github.com/kubernetes/apimachinery/compare/v0.26.3...v0.27.1) --- updated-dependencies: - dependency-name: k8s.io/apimachinery dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 26 ++++++++------------- go.sum | 72 +++++++++++++++++++++++++--------------------------------- 2 files changed, 41 insertions(+), 57 deletions(-) diff --git a/go.mod b/go.mod index a6cbcc4b8..9914513ee 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/onsi/ginkgo v1.16.5 github.com/onsi/gomega v1.27.6 k8s.io/api v0.26.3 - k8s.io/apimachinery v0.26.3 + k8s.io/apimachinery v0.27.1 k8s.io/client-go v0.26.3 k8s.io/klog/v2 v2.90.1 sigs.k8s.io/controller-runtime v0.14.6 @@ -29,45 +29,41 @@ require ( github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-logr/zapr v1.2.3 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.20.0 // indirect - github.com/go-openapi/swag v0.19.14 // indirect - github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.1 // indirect + github.com/go-openapi/swag v0.22.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/gnostic v0.5.7-v3refs // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/gofuzz v1.1.0 // indirect - github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect - github.com/google/uuid v1.1.2 // indirect + github.com/google/uuid v1.3.0 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/mailru/easyjson v0.7.6 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/nxadm/tail v1.4.8 // indirect - github.com/onsi/ginkgo/v2 v2.9.2 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/prometheus/client_golang v1.14.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.37.0 // indirect github.com/prometheus/procfs v0.8.0 // indirect + github.com/rogpeppe/go-internal v1.10.0 // indirect github.com/spf13/pflag v1.0.5 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.7.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/mod v0.9.0 // indirect golang.org/x/net v0.8.0 // indirect golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect golang.org/x/sys v0.6.0 // indirect golang.org/x/term v0.6.0 // indirect golang.org/x/text v0.8.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.7.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.28.1 // indirect @@ -76,11 +72,9 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.26.1 // indirect - k8s.io/code-generator v0.26.1 // indirect k8s.io/component-base v0.26.1 // indirect - k8s.io/gengo v0.0.0-20220902162205-c0856e24416d // indirect - k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect - k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect - sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect + k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a // indirect + k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect ) diff --git a/go.sum b/go.sum index f6e327ec8..05c0962b8 100644 --- a/go.sum +++ b/go.sum @@ -89,7 +89,6 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= @@ -98,18 +97,15 @@ github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= github.com/go-openapi/errors v0.20.3 h1:rz6kiC84sqNQoqrtulzaL/VERgkoCyB6WdEkc2ujzUc= github.com/go-openapi/errors v0.20.3/go.mod h1:Z3FlZ4I8jEGxjUK+bugx3on2mIAk4txuAOhlsB1FSgk= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= -github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= -github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonreference v0.20.1 h1:FBLnyygC4/IZZr893oiomc9XaghoveYTrLC1F86HID8= +github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= @@ -171,18 +167,16 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= @@ -207,14 +201,14 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2 h1:hAHbPm5IJGijwng3PWk09JkG9WeqChjprR5s9bBZ+OM= github.com/matttproud/golang_protobuf_extensions v1.0.2/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= @@ -229,7 +223,6 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= @@ -241,7 +234,6 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108 github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.9.2 h1:BA2GMJOtfGAfagzYtrAlufIP0lq6QERkFmHLMLPwFSU= -github.com/onsi/ginkgo/v2 v2.9.2/go.mod h1:WHcJJG2dIlcCqVfBAwUCrJxSPFb6v4azBwgxeMeDuts= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= @@ -279,6 +271,8 @@ github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= @@ -287,13 +281,18 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -350,8 +349,6 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= -golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -506,7 +503,6 @@ golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjs golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -517,7 +513,6 @@ golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= -golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -608,8 +603,9 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= @@ -640,32 +636,26 @@ k8s.io/api v0.26.3 h1:emf74GIQMTik01Aum9dPP0gAypL8JTLl/lHa4V9RFSU= k8s.io/api v0.26.3/go.mod h1:PXsqwPMXBSBcL1lJ9CYDKy7kIReUydukS5JiRlxC3qE= k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI= k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM= -k8s.io/apimachinery v0.26.3 h1:dQx6PNETJ7nODU3XPtrwkfuubs6w7sX0M8n61zHIV/k= -k8s.io/apimachinery v0.26.3/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I= +k8s.io/apimachinery v0.27.1 h1:EGuZiLI95UQQcClhanryclaQE6xjg1Bts6/L3cD7zyc= +k8s.io/apimachinery v0.27.1/go.mod h1:5ikh59fK3AJ287GUvpUsryoMFtH9zj/ARfWCo3AyXTM= k8s.io/client-go v0.26.3 h1:k1UY+KXfkxV2ScEL3gilKcF7761xkYsSD6BC9szIu8s= k8s.io/client-go v0.26.3/go.mod h1:ZPNu9lm8/dbRIPAgteN30RSXea6vrCpFvq+MateTUuQ= -k8s.io/code-generator v0.26.1 h1:dusFDsnNSKlMFYhzIM0jAO1OlnTN5WYwQQ+Ai12IIlo= -k8s.io/code-generator v0.26.1/go.mod h1:OMoJ5Dqx1wgaQzKgc+ZWaZPfGjdRq/Y3WubFrZmeI3I= k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= -k8s.io/gengo v0.0.0-20220902162205-c0856e24416d h1:U9tB195lKdzwqicbJvyJeOXV7Klv+wNAWENRnXEGi08= -k8s.io/gengo v0.0.0-20220902162205-c0856e24416d/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= -k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y= -k8s.io/utils v0.0.0-20221128185143-99ec85e7a448/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a h1:gmovKNur38vgoWfGtP5QOGNOA7ki4n6qNYoFAgMlNvg= +k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a/go.mod h1:y5VtZWM9sHHc2ZodIH/6SHzXj+TPU5USoA8lcIeKEKY= +k8s.io/utils v0.0.0-20230209194617-a36077c30491 h1:r0BAOLElQnnFhE/ApUsg3iHdVYYPBjNSSOMowRZxxsY= +k8s.io/utils v0.0.0-20230209194617-a36077c30491/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/controller-runtime v0.14.6 h1:oxstGVvXGNnMvY7TAESYk+lzr6S3V5VFxQ6d92KcwQA= sigs.k8s.io/controller-runtime v0.14.6/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= From 35aaa2d9c1969254d8da1175871c2fbcbfc4fb7f Mon Sep 17 00:00:00 2001 From: flxman Date: Fri, 28 Apr 2023 15:04:45 +0200 Subject: [PATCH 09/78] envVars support in fluentbit helm template Signed-off-by: flxman --- charts/fluent-operator/templates/fluentbit-fluentBit.yaml | 4 ++++ charts/fluent-operator/values.yaml | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/charts/fluent-operator/templates/fluentbit-fluentBit.yaml b/charts/fluent-operator/templates/fluentbit-fluentBit.yaml index 6f03e229e..1038ef609 100644 --- a/charts/fluent-operator/templates/fluentbit-fluentBit.yaml +++ b/charts/fluent-operator/templates/fluentbit-fluentBit.yaml @@ -18,6 +18,10 @@ spec: resources: {{- toYaml .Values.fluentbit.resources | nindent 4 }} fluentBitConfigName: fluent-bit-config +{{- if .Values.fluentbit.envVars }} + envVars: +{{ toYaml .Values.fluentbit.envVars | indent 4 }} +{{- end }} {{- with .Values.fluentbit.tolerations }} tolerations: {{ toYaml . | indent 4 }} diff --git a/charts/fluent-operator/values.yaml b/charts/fluent-operator/values.yaml index 8b695689c..e85202de0 100644 --- a/charts/fluent-operator/values.yaml +++ b/charts/fluent-operator/values.yaml @@ -98,6 +98,11 @@ fluentbit: - operator: Exists # Priority Class applied to Fluent Bit pods. Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass priorityClassName: "" + # Environment variables that can be passed to fluentbit pods + envVars: [] + # - name: FOO + # value: "bar" + # Remove the above empty volumes and volumesMounts, and then set additionalVolumes and additionalVolumesMounts as below if you want to collect node exporter metrics # additionalVolumes: # - name: hostProc From c30275f2f342e82daa4e3dd00f6e14fb0717d177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Mj=C3=B8nes=20Loe?= Date: Fri, 28 Apr 2023 17:50:20 +0200 Subject: [PATCH 10/78] Add uri field for each telemetry type, remove old uri field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jens Mjønes Loe --- .../plugins/output/open_telemetry_types.go | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/apis/fluentbit/v1alpha2/plugins/output/open_telemetry_types.go b/apis/fluentbit/v1alpha2/plugins/output/open_telemetry_types.go index 636670d60..7988f11c1 100644 --- a/apis/fluentbit/v1alpha2/plugins/output/open_telemetry_types.go +++ b/apis/fluentbit/v1alpha2/plugins/output/open_telemetry_types.go @@ -2,14 +2,14 @@ package output import ( "fmt" + "github.com/fluent/fluent-operator/v2/apis/fluentbit/v1alpha2/plugins" "github.com/fluent/fluent-operator/v2/apis/fluentbit/v1alpha2/plugins/params" ) // +kubebuilder:object:generate:=true -// OpenTelemetry is An output plugin to submit Metrics to an OpenTelemetry endpoint,
-// allows taking metrics from Fluent Bit and submit them to an OpenTelemetry HTTP endpoint.
+// The OpenTelemetry plugin allows you to take logs, metrics, and traces from Fluent Bit and submit them to an OpenTelemetry HTTP endpoint.
// **For full documentation, refer to https://docs.fluentbit.io/manual/pipeline/outputs/opentelemetry** type OpenTelemetry struct { // IP address or hostname of the target HTTP Server, default `127.0.0.1` @@ -25,8 +25,12 @@ type OpenTelemetry struct { // Specify an HTTP Proxy. The expected format of this value is http://HOST:PORT. Note that HTTPS is not currently supported. // It is recommended not to set this and to configure the HTTP proxy environment variables instead as they support both HTTP and HTTPS. Proxy string `json:"proxy,omitempty"` - // Specify an optional HTTP URI for the target web server, e.g: /something - Uri string `json:"uri,omitempty"` + // Specify an optional HTTP URI for the target web server listening for metrics, e.g: /v1/metrics + MetricsUri string `json:"metricsUri,omitempty"` + // Specify an optional HTTP URI for the target web server listening for logs, e.g: /v1/logs + LogsUri string `json:"logsUri,omitempty"` + // Specify an optional HTTP URI for the target web server listening for traces, e.g: /v1/traces + TracesUri string `json:"tracesUri,omitempty"` // Add a HTTP header key/value pair. Multiple headers can be set. Header map[string]string `json:"header,omitempty"` // Log the response payload within the Fluent Bit log. @@ -67,8 +71,14 @@ func (o *OpenTelemetry) Params(sl plugins.SecretLoader) (*params.KVs, error) { if o.Proxy != "" { kvs.Insert("proxy", o.Proxy) } - if o.Uri != "" { - kvs.Insert("uri", o.Uri) + if o.MetricsUri != "" { + kvs.Insert("metrics_uri", o.MetricsUri) + } + if o.LogsUri != "" { + kvs.Insert("logs_uri", o.LogsUri) + } + if o.TracesUri != "" { + kvs.Insert("traces_uri", o.TracesUri) } kvs.InsertStringMap(o.Header, func(k, v string) (string, string) { return "header", fmt.Sprintf(" %s %s", k, v) From 57777b03aa90d2c0b52eaa95fecc0f0c54948c53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Mj=C3=B8nes=20Loe?= Date: Sat, 29 Apr 2023 16:19:45 +0200 Subject: [PATCH 11/78] generate manifests with command "make manifests" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jens Mjønes Loe --- .../fluentbit.fluent.io_clusteroutputs.yaml | 211 ++++++- .../crds/fluentbit.fluent.io_outputs.yaml | 211 ++++++- .../crds/fluentd.fluent.io_fluentds.yaml | 222 ++++---- .../fluentbit.fluent.io_clusteroutputs.yaml | 211 ++++++- .../bases/fluentbit.fluent.io_outputs.yaml | 211 ++++++- .../crd/bases/fluentd.fluent.io_fluentds.yaml | 220 +++---- go.mod | 4 + go.sum | 11 + manifests/setup/fluent-operator-crd.yaml | 537 +++++++++++++++++- manifests/setup/setup.yaml | 537 +++++++++++++++++- 10 files changed, 2138 insertions(+), 237 deletions(-) diff --git a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml index b35ee1b7b..1a479bca8 100644 --- a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml +++ b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml @@ -1039,6 +1039,205 @@ spec: server, e.g: /something' type: string type: object + influxDB: + description: InfluxDB defines InfluxDB Output configuration. + properties: + autoTags: + description: Automatically tag keys where value is string. + type: boolean + bucket: + description: InfluxDB bucket name where records will be inserted + - if specified, database is ignored and v2 of API is used + type: string + database: + description: InfluxDB database name where records will be inserted. + type: string + host: + description: IP address or hostname of the target InfluxDB service. + format: ipv6 + type: string + httpPassword: + description: Password for user defined in HTTP_User + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + httpToken: + description: Authentication token used with InfluxDB v2 - if specified, + both HTTPUser and HTTPPasswd are ignored + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + httpUser: + description: Optional username for HTTP Basic Authentication + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + org: + description: InfluxDB organization name where the bucket is (v2 + only) + type: string + port: + description: TCP port of the target InfluxDB service. + format: int32 + maximum: 65536 + minimum: 0 + type: integer + sequenceTag: + description: The name of the tag whose value is incremented for + the consecutive simultaneous events. + type: string + tagKeys: + description: List of keys that needs to be tagged + items: + type: string + type: array + tagListKey: + description: Key of the string array optionally contained within + each log record that contains tag keys for that record + type: string + tagsListEnabled: + description: Dynamically tag keys which are in the string array + at Tags_List_Key key. + type: boolean + tls: + description: Fluent Bit provides integrated support for Transport + Layer Security (TLS) and it predecessor Secure Sockets Layer + (SSL) respectively. + properties: + caFile: + description: Absolute path to CA certificate file + type: string + caPath: + description: Absolute path to scan for certificate files + type: string + crtFile: + description: Absolute path to Certificate file + type: string + debug: + description: 'Set TLS debug verbosity level. It accept the + following values: 0 (No debug), 1 (Error), 2 (State change), + 3 (Informational) and 4 Verbose' + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + format: int32 + type: integer + keyFile: + description: Absolute path to private Key file + type: string + keyPassword: + description: Optional password for tls.key_file file + properties: + valueFrom: + description: ValueSource defines how to find a value's + key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + verify: + description: Force certificate validation + type: boolean + vhost: + description: Hostname to be used for TLS SNI extension + type: string + type: object + required: + - host + type: object kafka: description: Kafka defines Kafka Output configuration. properties: @@ -1663,6 +1862,14 @@ spec: logResponsePayload: description: Log the response payload within the Fluent Bit log. type: boolean + logsUri: + description: 'Specify an optional HTTP URI for the target web + server listening for logs, e.g: /v1/logs' + type: string + metricsUri: + description: 'Specify an optional HTTP URI for the target web + server listening for metrics, e.g: /v1/metrics' + type: string port: description: TCP port of the target OpenSearch instance, default `80` @@ -1744,9 +1951,9 @@ spec: description: Hostname to be used for TLS SNI extension type: string type: object - uri: + tracesUri: description: 'Specify an optional HTTP URI for the target web - server, e.g: /something' + server listening for traces, e.g: /v1/traces' type: string type: object prometheusRemoteWrite: diff --git a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml index 1f10d256f..2811de1f4 100644 --- a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml +++ b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml @@ -1039,6 +1039,205 @@ spec: server, e.g: /something' type: string type: object + influxDB: + description: InfluxDB defines InfluxDB Output configuration. + properties: + autoTags: + description: Automatically tag keys where value is string. + type: boolean + bucket: + description: InfluxDB bucket name where records will be inserted + - if specified, database is ignored and v2 of API is used + type: string + database: + description: InfluxDB database name where records will be inserted. + type: string + host: + description: IP address or hostname of the target InfluxDB service. + format: ipv6 + type: string + httpPassword: + description: Password for user defined in HTTP_User + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + httpToken: + description: Authentication token used with InfluxDB v2 - if specified, + both HTTPUser and HTTPPasswd are ignored + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + httpUser: + description: Optional username for HTTP Basic Authentication + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + org: + description: InfluxDB organization name where the bucket is (v2 + only) + type: string + port: + description: TCP port of the target InfluxDB service. + format: int32 + maximum: 65536 + minimum: 0 + type: integer + sequenceTag: + description: The name of the tag whose value is incremented for + the consecutive simultaneous events. + type: string + tagKeys: + description: List of keys that needs to be tagged + items: + type: string + type: array + tagListKey: + description: Key of the string array optionally contained within + each log record that contains tag keys for that record + type: string + tagsListEnabled: + description: Dynamically tag keys which are in the string array + at Tags_List_Key key. + type: boolean + tls: + description: Fluent Bit provides integrated support for Transport + Layer Security (TLS) and it predecessor Secure Sockets Layer + (SSL) respectively. + properties: + caFile: + description: Absolute path to CA certificate file + type: string + caPath: + description: Absolute path to scan for certificate files + type: string + crtFile: + description: Absolute path to Certificate file + type: string + debug: + description: 'Set TLS debug verbosity level. It accept the + following values: 0 (No debug), 1 (Error), 2 (State change), + 3 (Informational) and 4 Verbose' + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + format: int32 + type: integer + keyFile: + description: Absolute path to private Key file + type: string + keyPassword: + description: Optional password for tls.key_file file + properties: + valueFrom: + description: ValueSource defines how to find a value's + key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + verify: + description: Force certificate validation + type: boolean + vhost: + description: Hostname to be used for TLS SNI extension + type: string + type: object + required: + - host + type: object kafka: description: Kafka defines Kafka Output configuration. properties: @@ -1663,6 +1862,14 @@ spec: logResponsePayload: description: Log the response payload within the Fluent Bit log. type: boolean + logsUri: + description: 'Specify an optional HTTP URI for the target web + server listening for logs, e.g: /v1/logs' + type: string + metricsUri: + description: 'Specify an optional HTTP URI for the target web + server listening for metrics, e.g: /v1/metrics' + type: string port: description: TCP port of the target OpenSearch instance, default `80` @@ -1744,9 +1951,9 @@ spec: description: Hostname to be used for TLS SNI extension type: string type: object - uri: + tracesUri: description: 'Specify an optional HTTP URI for the target web - server, e.g: /something' + server listening for traces, e.g: /v1/traces' type: string type: object prometheusRemoteWrite: diff --git a/charts/fluent-operator/charts/fluentd-crds/crds/fluentd.fluent.io_fluentds.yaml b/charts/fluent-operator/charts/fluentd-crds/crds/fluentd.fluent.io_fluentds.yaml index 16ce03244..eced921de 100644 --- a/charts/fluent-operator/charts/fluentd-crds/crds/fluentd.fluent.io_fluentds.yaml +++ b/charts/fluent-operator/charts/fluentd-crds/crds/fluentd.fluent.io_fluentds.yaml @@ -869,122 +869,12 @@ spec: additionalProperties: type: string description: Annotations to add to each Fluentd pod. - type: objects + type: object args: description: Fluentd Watcher command line arguments. items: type: string type: array - envVars: - description: EnvVars represent environment variables that can be passed - to fluentd pods. - items: - description: EnvVar represents an environment variable present in - a Container. - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using - the previously defined environment variables in the container - and any service environment variables. If a variable cannot - be resolved, the reference in the input string will be unchanged. - Double $$ are reduced to a single $, which allows for escaping - the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the - string literal "$(VAR_NAME)". Escaped references will never - be expanded, regardless of whether the variable exists or - not. Defaults to "".' - type: string - valueFrom: - description: Source for the environment variable's value. Cannot - be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, - status.podIP, status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath is - written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified - API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed - resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array buffer: description: Buffer definition properties: @@ -1376,6 +1266,116 @@ spec: description: By default will build the related service according to the globalinputs definition. type: boolean + envVars: + description: EnvVars represent environment variables that can be passed + to fluentd pods. + items: + description: EnvVar represents an environment variable present in + a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using + the previously defined environment variables in the container + and any service environment variables. If a variable cannot + be resolved, the reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the + string literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists or + not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot + be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array fluentdCfgSelector: description: FluentdCfgSelector defines the selectors to select the fluentd config CRs. diff --git a/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml b/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml index b35ee1b7b..1a479bca8 100644 --- a/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml +++ b/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml @@ -1039,6 +1039,205 @@ spec: server, e.g: /something' type: string type: object + influxDB: + description: InfluxDB defines InfluxDB Output configuration. + properties: + autoTags: + description: Automatically tag keys where value is string. + type: boolean + bucket: + description: InfluxDB bucket name where records will be inserted + - if specified, database is ignored and v2 of API is used + type: string + database: + description: InfluxDB database name where records will be inserted. + type: string + host: + description: IP address or hostname of the target InfluxDB service. + format: ipv6 + type: string + httpPassword: + description: Password for user defined in HTTP_User + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + httpToken: + description: Authentication token used with InfluxDB v2 - if specified, + both HTTPUser and HTTPPasswd are ignored + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + httpUser: + description: Optional username for HTTP Basic Authentication + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + org: + description: InfluxDB organization name where the bucket is (v2 + only) + type: string + port: + description: TCP port of the target InfluxDB service. + format: int32 + maximum: 65536 + minimum: 0 + type: integer + sequenceTag: + description: The name of the tag whose value is incremented for + the consecutive simultaneous events. + type: string + tagKeys: + description: List of keys that needs to be tagged + items: + type: string + type: array + tagListKey: + description: Key of the string array optionally contained within + each log record that contains tag keys for that record + type: string + tagsListEnabled: + description: Dynamically tag keys which are in the string array + at Tags_List_Key key. + type: boolean + tls: + description: Fluent Bit provides integrated support for Transport + Layer Security (TLS) and it predecessor Secure Sockets Layer + (SSL) respectively. + properties: + caFile: + description: Absolute path to CA certificate file + type: string + caPath: + description: Absolute path to scan for certificate files + type: string + crtFile: + description: Absolute path to Certificate file + type: string + debug: + description: 'Set TLS debug verbosity level. It accept the + following values: 0 (No debug), 1 (Error), 2 (State change), + 3 (Informational) and 4 Verbose' + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + format: int32 + type: integer + keyFile: + description: Absolute path to private Key file + type: string + keyPassword: + description: Optional password for tls.key_file file + properties: + valueFrom: + description: ValueSource defines how to find a value's + key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + verify: + description: Force certificate validation + type: boolean + vhost: + description: Hostname to be used for TLS SNI extension + type: string + type: object + required: + - host + type: object kafka: description: Kafka defines Kafka Output configuration. properties: @@ -1663,6 +1862,14 @@ spec: logResponsePayload: description: Log the response payload within the Fluent Bit log. type: boolean + logsUri: + description: 'Specify an optional HTTP URI for the target web + server listening for logs, e.g: /v1/logs' + type: string + metricsUri: + description: 'Specify an optional HTTP URI for the target web + server listening for metrics, e.g: /v1/metrics' + type: string port: description: TCP port of the target OpenSearch instance, default `80` @@ -1744,9 +1951,9 @@ spec: description: Hostname to be used for TLS SNI extension type: string type: object - uri: + tracesUri: description: 'Specify an optional HTTP URI for the target web - server, e.g: /something' + server listening for traces, e.g: /v1/traces' type: string type: object prometheusRemoteWrite: diff --git a/config/crd/bases/fluentbit.fluent.io_outputs.yaml b/config/crd/bases/fluentbit.fluent.io_outputs.yaml index 1f10d256f..2811de1f4 100644 --- a/config/crd/bases/fluentbit.fluent.io_outputs.yaml +++ b/config/crd/bases/fluentbit.fluent.io_outputs.yaml @@ -1039,6 +1039,205 @@ spec: server, e.g: /something' type: string type: object + influxDB: + description: InfluxDB defines InfluxDB Output configuration. + properties: + autoTags: + description: Automatically tag keys where value is string. + type: boolean + bucket: + description: InfluxDB bucket name where records will be inserted + - if specified, database is ignored and v2 of API is used + type: string + database: + description: InfluxDB database name where records will be inserted. + type: string + host: + description: IP address or hostname of the target InfluxDB service. + format: ipv6 + type: string + httpPassword: + description: Password for user defined in HTTP_User + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + httpToken: + description: Authentication token used with InfluxDB v2 - if specified, + both HTTPUser and HTTPPasswd are ignored + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + httpUser: + description: Optional username for HTTP Basic Authentication + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + org: + description: InfluxDB organization name where the bucket is (v2 + only) + type: string + port: + description: TCP port of the target InfluxDB service. + format: int32 + maximum: 65536 + minimum: 0 + type: integer + sequenceTag: + description: The name of the tag whose value is incremented for + the consecutive simultaneous events. + type: string + tagKeys: + description: List of keys that needs to be tagged + items: + type: string + type: array + tagListKey: + description: Key of the string array optionally contained within + each log record that contains tag keys for that record + type: string + tagsListEnabled: + description: Dynamically tag keys which are in the string array + at Tags_List_Key key. + type: boolean + tls: + description: Fluent Bit provides integrated support for Transport + Layer Security (TLS) and it predecessor Secure Sockets Layer + (SSL) respectively. + properties: + caFile: + description: Absolute path to CA certificate file + type: string + caPath: + description: Absolute path to scan for certificate files + type: string + crtFile: + description: Absolute path to Certificate file + type: string + debug: + description: 'Set TLS debug verbosity level. It accept the + following values: 0 (No debug), 1 (Error), 2 (State change), + 3 (Informational) and 4 Verbose' + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + format: int32 + type: integer + keyFile: + description: Absolute path to private Key file + type: string + keyPassword: + description: Optional password for tls.key_file file + properties: + valueFrom: + description: ValueSource defines how to find a value's + key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + verify: + description: Force certificate validation + type: boolean + vhost: + description: Hostname to be used for TLS SNI extension + type: string + type: object + required: + - host + type: object kafka: description: Kafka defines Kafka Output configuration. properties: @@ -1663,6 +1862,14 @@ spec: logResponsePayload: description: Log the response payload within the Fluent Bit log. type: boolean + logsUri: + description: 'Specify an optional HTTP URI for the target web + server listening for logs, e.g: /v1/logs' + type: string + metricsUri: + description: 'Specify an optional HTTP URI for the target web + server listening for metrics, e.g: /v1/metrics' + type: string port: description: TCP port of the target OpenSearch instance, default `80` @@ -1744,9 +1951,9 @@ spec: description: Hostname to be used for TLS SNI extension type: string type: object - uri: + tracesUri: description: 'Specify an optional HTTP URI for the target web - server, e.g: /something' + server listening for traces, e.g: /v1/traces' type: string type: object prometheusRemoteWrite: diff --git a/config/crd/bases/fluentd.fluent.io_fluentds.yaml b/config/crd/bases/fluentd.fluent.io_fluentds.yaml index 2a7e798ab..eced921de 100644 --- a/config/crd/bases/fluentd.fluent.io_fluentds.yaml +++ b/config/crd/bases/fluentd.fluent.io_fluentds.yaml @@ -875,116 +875,6 @@ spec: items: type: string type: array - envVars: - description: EnvVars represent environment variables that can be passed - to fluentd pods. - items: - description: EnvVar represents an environment variable present in - a Container. - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using - the previously defined environment variables in the container - and any service environment variables. If a variable cannot - be resolved, the reference in the input string will be unchanged. - Double $$ are reduced to a single $, which allows for escaping - the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the - string literal "$(VAR_NAME)". Escaped references will never - be expanded, regardless of whether the variable exists or - not. Defaults to "".' - type: string - valueFrom: - description: Source for the environment variable's value. Cannot - be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, - status.podIP, status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath is - written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified - API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed - resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array buffer: description: Buffer definition properties: @@ -1376,6 +1266,116 @@ spec: description: By default will build the related service according to the globalinputs definition. type: boolean + envVars: + description: EnvVars represent environment variables that can be passed + to fluentd pods. + items: + description: EnvVar represents an environment variable present in + a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using + the previously defined environment variables in the container + and any service environment variables. If a variable cannot + be resolved, the reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the + string literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists or + not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot + be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array fluentdCfgSelector: description: FluentdCfgSelector defines the selectors to select the fluentd config CRs. diff --git a/go.mod b/go.mod index 9914513ee..95e53d6bb 100644 --- a/go.mod +++ b/go.mod @@ -58,12 +58,14 @@ require ( go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.7.0 // indirect go.uber.org/zap v1.24.0 // indirect + golang.org/x/mod v0.9.0 // indirect golang.org/x/net v0.8.0 // indirect golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect golang.org/x/sys v0.6.0 // indirect golang.org/x/term v0.6.0 // indirect golang.org/x/text v0.8.0 // indirect golang.org/x/time v0.3.0 // indirect + golang.org/x/tools v0.7.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.28.1 // indirect @@ -72,7 +74,9 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.26.1 // indirect + k8s.io/code-generator v0.26.1 // indirect k8s.io/component-base v0.26.1 // indirect + k8s.io/gengo v0.0.0-20220902162205-c0856e24416d // indirect k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a // indirect k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect diff --git a/go.sum b/go.sum index 05c0962b8..cf28da8f1 100644 --- a/go.sum +++ b/go.sum @@ -89,6 +89,7 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= @@ -349,6 +350,8 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= +golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -503,6 +506,7 @@ golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjs golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -513,6 +517,7 @@ golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -640,8 +645,13 @@ k8s.io/apimachinery v0.27.1 h1:EGuZiLI95UQQcClhanryclaQE6xjg1Bts6/L3cD7zyc= k8s.io/apimachinery v0.27.1/go.mod h1:5ikh59fK3AJ287GUvpUsryoMFtH9zj/ARfWCo3AyXTM= k8s.io/client-go v0.26.3 h1:k1UY+KXfkxV2ScEL3gilKcF7761xkYsSD6BC9szIu8s= k8s.io/client-go v0.26.3/go.mod h1:ZPNu9lm8/dbRIPAgteN30RSXea6vrCpFvq+MateTUuQ= +k8s.io/code-generator v0.26.1 h1:dusFDsnNSKlMFYhzIM0jAO1OlnTN5WYwQQ+Ai12IIlo= +k8s.io/code-generator v0.26.1/go.mod h1:OMoJ5Dqx1wgaQzKgc+ZWaZPfGjdRq/Y3WubFrZmeI3I= k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= +k8s.io/gengo v0.0.0-20220902162205-c0856e24416d h1:U9tB195lKdzwqicbJvyJeOXV7Klv+wNAWENRnXEGi08= +k8s.io/gengo v0.0.0-20220902162205-c0856e24416d/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a h1:gmovKNur38vgoWfGtP5QOGNOA7ki4n6qNYoFAgMlNvg= @@ -657,5 +667,6 @@ sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMm sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/manifests/setup/fluent-operator-crd.yaml b/manifests/setup/fluent-operator-crd.yaml index bf089e808..977385a17 100644 --- a/manifests/setup/fluent-operator-crd.yaml +++ b/manifests/setup/fluent-operator-crd.yaml @@ -3049,6 +3049,205 @@ spec: server, e.g: /something' type: string type: object + influxDB: + description: InfluxDB defines InfluxDB Output configuration. + properties: + autoTags: + description: Automatically tag keys where value is string. + type: boolean + bucket: + description: InfluxDB bucket name where records will be inserted + - if specified, database is ignored and v2 of API is used + type: string + database: + description: InfluxDB database name where records will be inserted. + type: string + host: + description: IP address or hostname of the target InfluxDB service. + format: ipv6 + type: string + httpPassword: + description: Password for user defined in HTTP_User + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + httpToken: + description: Authentication token used with InfluxDB v2 - if specified, + both HTTPUser and HTTPPasswd are ignored + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + httpUser: + description: Optional username for HTTP Basic Authentication + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + org: + description: InfluxDB organization name where the bucket is (v2 + only) + type: string + port: + description: TCP port of the target InfluxDB service. + format: int32 + maximum: 65536 + minimum: 0 + type: integer + sequenceTag: + description: The name of the tag whose value is incremented for + the consecutive simultaneous events. + type: string + tagKeys: + description: List of keys that needs to be tagged + items: + type: string + type: array + tagListKey: + description: Key of the string array optionally contained within + each log record that contains tag keys for that record + type: string + tagsListEnabled: + description: Dynamically tag keys which are in the string array + at Tags_List_Key key. + type: boolean + tls: + description: Fluent Bit provides integrated support for Transport + Layer Security (TLS) and it predecessor Secure Sockets Layer + (SSL) respectively. + properties: + caFile: + description: Absolute path to CA certificate file + type: string + caPath: + description: Absolute path to scan for certificate files + type: string + crtFile: + description: Absolute path to Certificate file + type: string + debug: + description: 'Set TLS debug verbosity level. It accept the + following values: 0 (No debug), 1 (Error), 2 (State change), + 3 (Informational) and 4 Verbose' + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + format: int32 + type: integer + keyFile: + description: Absolute path to private Key file + type: string + keyPassword: + description: Optional password for tls.key_file file + properties: + valueFrom: + description: ValueSource defines how to find a value's + key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + verify: + description: Force certificate validation + type: boolean + vhost: + description: Hostname to be used for TLS SNI extension + type: string + type: object + required: + - host + type: object kafka: description: Kafka defines Kafka Output configuration. properties: @@ -3673,6 +3872,14 @@ spec: logResponsePayload: description: Log the response payload within the Fluent Bit log. type: boolean + logsUri: + description: 'Specify an optional HTTP URI for the target web + server listening for logs, e.g: /v1/logs' + type: string + metricsUri: + description: 'Specify an optional HTTP URI for the target web + server listening for metrics, e.g: /v1/metrics' + type: string port: description: TCP port of the target OpenSearch instance, default `80` @@ -3754,9 +3961,9 @@ spec: description: Hostname to be used for TLS SNI extension type: string type: object - uri: + tracesUri: description: 'Specify an optional HTTP URI for the target web - server, e.g: /something' + server listening for traces, e.g: /v1/traces' type: string type: object prometheusRemoteWrite: @@ -18232,6 +18439,11 @@ spec: type: array type: object type: object + annotations: + additionalProperties: + type: string + description: Annotations to add to each Fluentd pod. + type: object args: description: Fluentd Watcher command line arguments. items: @@ -18628,6 +18840,116 @@ spec: description: By default will build the related service according to the globalinputs definition. type: boolean + envVars: + description: EnvVars represent environment variables that can be passed + to fluentd pods. + items: + description: EnvVar represents an environment variable present in + a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using + the previously defined environment variables in the container + and any service environment variables. If a variable cannot + be resolved, the reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the + string literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists or + not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot + be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array fluentdCfgSelector: description: FluentdCfgSelector defines the selectors to select the fluentd config CRs. @@ -22331,6 +22653,205 @@ spec: server, e.g: /something' type: string type: object + influxDB: + description: InfluxDB defines InfluxDB Output configuration. + properties: + autoTags: + description: Automatically tag keys where value is string. + type: boolean + bucket: + description: InfluxDB bucket name where records will be inserted + - if specified, database is ignored and v2 of API is used + type: string + database: + description: InfluxDB database name where records will be inserted. + type: string + host: + description: IP address or hostname of the target InfluxDB service. + format: ipv6 + type: string + httpPassword: + description: Password for user defined in HTTP_User + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + httpToken: + description: Authentication token used with InfluxDB v2 - if specified, + both HTTPUser and HTTPPasswd are ignored + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + httpUser: + description: Optional username for HTTP Basic Authentication + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + org: + description: InfluxDB organization name where the bucket is (v2 + only) + type: string + port: + description: TCP port of the target InfluxDB service. + format: int32 + maximum: 65536 + minimum: 0 + type: integer + sequenceTag: + description: The name of the tag whose value is incremented for + the consecutive simultaneous events. + type: string + tagKeys: + description: List of keys that needs to be tagged + items: + type: string + type: array + tagListKey: + description: Key of the string array optionally contained within + each log record that contains tag keys for that record + type: string + tagsListEnabled: + description: Dynamically tag keys which are in the string array + at Tags_List_Key key. + type: boolean + tls: + description: Fluent Bit provides integrated support for Transport + Layer Security (TLS) and it predecessor Secure Sockets Layer + (SSL) respectively. + properties: + caFile: + description: Absolute path to CA certificate file + type: string + caPath: + description: Absolute path to scan for certificate files + type: string + crtFile: + description: Absolute path to Certificate file + type: string + debug: + description: 'Set TLS debug verbosity level. It accept the + following values: 0 (No debug), 1 (Error), 2 (State change), + 3 (Informational) and 4 Verbose' + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + format: int32 + type: integer + keyFile: + description: Absolute path to private Key file + type: string + keyPassword: + description: Optional password for tls.key_file file + properties: + valueFrom: + description: ValueSource defines how to find a value's + key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + verify: + description: Force certificate validation + type: boolean + vhost: + description: Hostname to be used for TLS SNI extension + type: string + type: object + required: + - host + type: object kafka: description: Kafka defines Kafka Output configuration. properties: @@ -22955,6 +23476,14 @@ spec: logResponsePayload: description: Log the response payload within the Fluent Bit log. type: boolean + logsUri: + description: 'Specify an optional HTTP URI for the target web + server listening for logs, e.g: /v1/logs' + type: string + metricsUri: + description: 'Specify an optional HTTP URI for the target web + server listening for metrics, e.g: /v1/metrics' + type: string port: description: TCP port of the target OpenSearch instance, default `80` @@ -23036,9 +23565,9 @@ spec: description: Hostname to be used for TLS SNI extension type: string type: object - uri: + tracesUri: description: 'Specify an optional HTTP URI for the target web - server, e.g: /something' + server listening for traces, e.g: /v1/traces' type: string type: object prometheusRemoteWrite: diff --git a/manifests/setup/setup.yaml b/manifests/setup/setup.yaml index 39b27fcee..7e5349e7f 100644 --- a/manifests/setup/setup.yaml +++ b/manifests/setup/setup.yaml @@ -3049,6 +3049,205 @@ spec: server, e.g: /something' type: string type: object + influxDB: + description: InfluxDB defines InfluxDB Output configuration. + properties: + autoTags: + description: Automatically tag keys where value is string. + type: boolean + bucket: + description: InfluxDB bucket name where records will be inserted + - if specified, database is ignored and v2 of API is used + type: string + database: + description: InfluxDB database name where records will be inserted. + type: string + host: + description: IP address or hostname of the target InfluxDB service. + format: ipv6 + type: string + httpPassword: + description: Password for user defined in HTTP_User + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + httpToken: + description: Authentication token used with InfluxDB v2 - if specified, + both HTTPUser and HTTPPasswd are ignored + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + httpUser: + description: Optional username for HTTP Basic Authentication + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + org: + description: InfluxDB organization name where the bucket is (v2 + only) + type: string + port: + description: TCP port of the target InfluxDB service. + format: int32 + maximum: 65536 + minimum: 0 + type: integer + sequenceTag: + description: The name of the tag whose value is incremented for + the consecutive simultaneous events. + type: string + tagKeys: + description: List of keys that needs to be tagged + items: + type: string + type: array + tagListKey: + description: Key of the string array optionally contained within + each log record that contains tag keys for that record + type: string + tagsListEnabled: + description: Dynamically tag keys which are in the string array + at Tags_List_Key key. + type: boolean + tls: + description: Fluent Bit provides integrated support for Transport + Layer Security (TLS) and it predecessor Secure Sockets Layer + (SSL) respectively. + properties: + caFile: + description: Absolute path to CA certificate file + type: string + caPath: + description: Absolute path to scan for certificate files + type: string + crtFile: + description: Absolute path to Certificate file + type: string + debug: + description: 'Set TLS debug verbosity level. It accept the + following values: 0 (No debug), 1 (Error), 2 (State change), + 3 (Informational) and 4 Verbose' + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + format: int32 + type: integer + keyFile: + description: Absolute path to private Key file + type: string + keyPassword: + description: Optional password for tls.key_file file + properties: + valueFrom: + description: ValueSource defines how to find a value's + key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + verify: + description: Force certificate validation + type: boolean + vhost: + description: Hostname to be used for TLS SNI extension + type: string + type: object + required: + - host + type: object kafka: description: Kafka defines Kafka Output configuration. properties: @@ -3673,6 +3872,14 @@ spec: logResponsePayload: description: Log the response payload within the Fluent Bit log. type: boolean + logsUri: + description: 'Specify an optional HTTP URI for the target web + server listening for logs, e.g: /v1/logs' + type: string + metricsUri: + description: 'Specify an optional HTTP URI for the target web + server listening for metrics, e.g: /v1/metrics' + type: string port: description: TCP port of the target OpenSearch instance, default `80` @@ -3754,9 +3961,9 @@ spec: description: Hostname to be used for TLS SNI extension type: string type: object - uri: + tracesUri: description: 'Specify an optional HTTP URI for the target web - server, e.g: /something' + server listening for traces, e.g: /v1/traces' type: string type: object prometheusRemoteWrite: @@ -18232,6 +18439,11 @@ spec: type: array type: object type: object + annotations: + additionalProperties: + type: string + description: Annotations to add to each Fluentd pod. + type: object args: description: Fluentd Watcher command line arguments. items: @@ -18628,6 +18840,116 @@ spec: description: By default will build the related service according to the globalinputs definition. type: boolean + envVars: + description: EnvVars represent environment variables that can be passed + to fluentd pods. + items: + description: EnvVar represents an environment variable present in + a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using + the previously defined environment variables in the container + and any service environment variables. If a variable cannot + be resolved, the reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the + string literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists or + not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot + be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array fluentdCfgSelector: description: FluentdCfgSelector defines the selectors to select the fluentd config CRs. @@ -22331,6 +22653,205 @@ spec: server, e.g: /something' type: string type: object + influxDB: + description: InfluxDB defines InfluxDB Output configuration. + properties: + autoTags: + description: Automatically tag keys where value is string. + type: boolean + bucket: + description: InfluxDB bucket name where records will be inserted + - if specified, database is ignored and v2 of API is used + type: string + database: + description: InfluxDB database name where records will be inserted. + type: string + host: + description: IP address or hostname of the target InfluxDB service. + format: ipv6 + type: string + httpPassword: + description: Password for user defined in HTTP_User + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + httpToken: + description: Authentication token used with InfluxDB v2 - if specified, + both HTTPUser and HTTPPasswd are ignored + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + httpUser: + description: Optional username for HTTP Basic Authentication + properties: + valueFrom: + description: ValueSource defines how to find a value's key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + org: + description: InfluxDB organization name where the bucket is (v2 + only) + type: string + port: + description: TCP port of the target InfluxDB service. + format: int32 + maximum: 65536 + minimum: 0 + type: integer + sequenceTag: + description: The name of the tag whose value is incremented for + the consecutive simultaneous events. + type: string + tagKeys: + description: List of keys that needs to be tagged + items: + type: string + type: array + tagListKey: + description: Key of the string array optionally contained within + each log record that contains tag keys for that record + type: string + tagsListEnabled: + description: Dynamically tag keys which are in the string array + at Tags_List_Key key. + type: boolean + tls: + description: Fluent Bit provides integrated support for Transport + Layer Security (TLS) and it predecessor Secure Sockets Layer + (SSL) respectively. + properties: + caFile: + description: Absolute path to CA certificate file + type: string + caPath: + description: Absolute path to scan for certificate files + type: string + crtFile: + description: Absolute path to Certificate file + type: string + debug: + description: 'Set TLS debug verbosity level. It accept the + following values: 0 (No debug), 1 (Error), 2 (State change), + 3 (Informational) and 4 Verbose' + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + format: int32 + type: integer + keyFile: + description: Absolute path to private Key file + type: string + keyPassword: + description: Optional password for tls.key_file file + properties: + valueFrom: + description: ValueSource defines how to find a value's + key. + properties: + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: object + verify: + description: Force certificate validation + type: boolean + vhost: + description: Hostname to be used for TLS SNI extension + type: string + type: object + required: + - host + type: object kafka: description: Kafka defines Kafka Output configuration. properties: @@ -22955,6 +23476,14 @@ spec: logResponsePayload: description: Log the response payload within the Fluent Bit log. type: boolean + logsUri: + description: 'Specify an optional HTTP URI for the target web + server listening for logs, e.g: /v1/logs' + type: string + metricsUri: + description: 'Specify an optional HTTP URI for the target web + server listening for metrics, e.g: /v1/metrics' + type: string port: description: TCP port of the target OpenSearch instance, default `80` @@ -23036,9 +23565,9 @@ spec: description: Hostname to be used for TLS SNI extension type: string type: object - uri: + tracesUri: description: 'Specify an optional HTTP URI for the target web - server, e.g: /something' + server listening for traces, e.g: /v1/traces' type: string type: object prometheusRemoteWrite: From 2a0979ca20f4ce847d81fcf3c201a9aa488ed796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Mj=C3=B8nes=20Loe?= Date: Sat, 29 Apr 2023 16:20:31 +0200 Subject: [PATCH 12/78] run "make generate" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jens Mjønes Loe --- apis/fluentbit/v1alpha2/zz_generated.deepcopy.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apis/fluentbit/v1alpha2/zz_generated.deepcopy.go b/apis/fluentbit/v1alpha2/zz_generated.deepcopy.go index c1648cc46..e037d0469 100644 --- a/apis/fluentbit/v1alpha2/zz_generated.deepcopy.go +++ b/apis/fluentbit/v1alpha2/zz_generated.deepcopy.go @@ -1283,6 +1283,11 @@ func (in *OutputSpec) DeepCopyInto(out *OutputSpec) { *out = new(output.Syslog) (*in).DeepCopyInto(*out) } + if in.InfluxDB != nil { + in, out := &in.InfluxDB, &out.InfluxDB + *out = new(output.InfluxDB) + (*in).DeepCopyInto(*out) + } if in.DataDog != nil { in, out := &in.DataDog, &out.DataDog *out = new(output.DataDog) From 75ce9ab8abba4cb5d88b077a3f139b9a00af1d9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Mj=C3=B8nes=20Loe?= Date: Sat, 29 Apr 2023 16:20:57 +0200 Subject: [PATCH 13/78] generate API-doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jens Mjønes Loe --- docs/fluentbit.md | 4 ++++ .../fluentbit/filter/recordmodifier.md | 4 +++- docs/plugins/fluentbit/output/influxdb.md | 21 +++++++++++++++++++ .../fluentbit/output/open_telemetry.md | 6 ++++-- docs/plugins/fluentbit/secret.md | 8 +++++++ 5 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 docs/plugins/fluentbit/output/influxdb.md diff --git a/docs/fluentbit.md b/docs/fluentbit.md index b8a2da2f0..5e5643f85 100644 --- a/docs/fluentbit.md +++ b/docs/fluentbit.md @@ -279,6 +279,7 @@ FilterSpec defines the desired state of ClusterFilter | ----- | ----------- | ------ | | match | A pattern to match against the tags of incoming records. It's case-sensitive and support the star (*) character as a wildcard. | string | | matchRegex | A regular expression to match against the tags of incoming records. Use this option if you want to use the full regex syntax. | string | +| logLevel | | string | | filters | A set of filter plugins in order. | []FilterItem | [Back to TOC](#table-of-contents) @@ -404,6 +405,7 @@ InputSpec defines the desired state of ClusterInput | Field | Description | Scheme | | ----- | ----------- | ------ | | alias | A user friendly alias name for this input plugin. Used in metrics for distinction of each configured input. | string | +| logLevel | | string | | dummy | Dummy defines Dummy Input configuration. | *[input.Dummy](plugins/input/dummy.md) | | tail | Tail defines Tail Input configuration. | *[input.Tail](plugins/input/tail.md) | | systemd | Systemd defines Systemd Input configuration. | *[input.Systemd](plugins/input/systemd.md) | @@ -458,6 +460,7 @@ OutputSpec defines the desired state of ClusterOutput | match | A pattern to match against the tags of incoming records. It's case sensitive and support the star (*) character as a wildcard. | string | | matchRegex | A regular expression to match against the tags of incoming records. Use this option if you want to use the full regex syntax. | string | | alias | A user friendly alias name for this output plugin. Used in metrics for distinction of each configured output. | string | +| logLevel | Set the plugin's logging verbosity level. Allowed values are: off, error, warn, info, debug and trace, Defaults to the SERVICE section's Log_Level | string | | azureBlob | AzureBlob defines AzureBlob Output Configuration | *[output.AzureBlob](plugins/output/azureblob.md) | | azureLogAnalytics | AzureLogAnalytics defines AzureLogAnalytics Output Configuration | *[output.AzureLogAnalytics](plugins/output/azureloganalytics.md) | | cloudWatch | CloudWatch defines CloudWatch Output Configuration | *[output.CloudWatch](plugins/output/cloudwatch.md) | @@ -472,6 +475,7 @@ OutputSpec defines the desired state of ClusterOutput | tcp | TCP defines TCP Output configuration. | *[output.TCP](plugins/output/tcp.md) | | loki | Loki defines Loki Output configuration. | *[output.Loki](plugins/output/loki.md) | | syslog | Syslog defines Syslog Output configuration. | *[output.Syslog](plugins/output/syslog.md) | +| influxDB | InfluxDB defines InfluxDB Output configuration. | *[output.InfluxDB](plugins/output/influxdb.md) | | datadog | DataDog defines DataDog Output configuration. | *[output.DataDog](plugins/output/datadog.md) | | firehose | Firehose defines Firehose Output configuration. | *[output.Firehose](plugins/output/firehose.md) | | stackdriver | Stackdriver defines Stackdriver Output Configuration | *[output.Stackdriver](plugins/output/stackdriver.md) | diff --git a/docs/plugins/fluentbit/filter/recordmodifier.md b/docs/plugins/fluentbit/filter/recordmodifier.md index 8cb40e068..474ece92c 100644 --- a/docs/plugins/fluentbit/filter/recordmodifier.md +++ b/docs/plugins/fluentbit/filter/recordmodifier.md @@ -7,4 +7,6 @@ The Record Modifier Filter plugin allows to append fields or to exclude specific | ----- | ----------- | ------ | | records | Append fields. This parameter needs key and value pair. | []string | | removeKeys | If the key is matched, that field is removed. | []string | -| whitelistKeys | If the key is not matched, that field is removed. | []string | +| allowlistKeys | If the key is not matched, that field is removed. | []string | +| whitelistKeys | An alias of allowlistKeys for backwards compatibility. | []string | +| uuidKeys | If set, the plugin appends uuid to each record. The value assigned becomes the key in the map. | []string | diff --git a/docs/plugins/fluentbit/output/influxdb.md b/docs/plugins/fluentbit/output/influxdb.md new file mode 100644 index 000000000..37099ade3 --- /dev/null +++ b/docs/plugins/fluentbit/output/influxdb.md @@ -0,0 +1,21 @@ +# InfluxDB + +The influxdb output plugin, allows to flush your records into a InfluxDB time series database.
**For full documentation, refer to https://docs.fluentbit.io/manual/pipeline/outputs/influxdb** + + +| Field | Description | Scheme | +| ----- | ----------- | ------ | +| host | IP address or hostname of the target InfluxDB service. | string | +| port | TCP port of the target InfluxDB service. | *int32 | +| database | InfluxDB database name where records will be inserted. | string | +| bucket | InfluxDB bucket name where records will be inserted - if specified, database is ignored and v2 of API is used | string | +| org | InfluxDB organization name where the bucket is (v2 only) | string | +| sequenceTag | The name of the tag whose value is incremented for the consecutive simultaneous events. | string | +| httpUser | Optional username for HTTP Basic Authentication | *[plugins.Secret](../secret.md) | +| httpPassword | Password for user defined in HTTP_User | *[plugins.Secret](../secret.md) | +| httpToken | Authentication token used with InfluxDB v2 - if specified, both HTTPUser and HTTPPasswd are ignored | *[plugins.Secret](../secret.md) | +| tagKeys | List of keys that needs to be tagged | []string | +| autoTags | Automatically tag keys where value is string. | *bool | +| tagsListEnabled | Dynamically tag keys which are in the string array at Tags_List_Key key. | *bool | +| tagListKey | Key of the string array optionally contained within each log record that contains tag keys for that record | string | +| tls | | *[plugins.TLS](../tls.md) | diff --git a/docs/plugins/fluentbit/output/open_telemetry.md b/docs/plugins/fluentbit/output/open_telemetry.md index 1dc42cf32..e0f4208f0 100644 --- a/docs/plugins/fluentbit/output/open_telemetry.md +++ b/docs/plugins/fluentbit/output/open_telemetry.md @@ -1,6 +1,6 @@ # OpenTelemetry -OpenTelemetry is An output plugin to submit Metrics to an OpenTelemetry endpoint,
allows taking metrics from Fluent Bit and submit them to an OpenTelemetry HTTP endpoint.
**For full documentation, refer to https://docs.fluentbit.io/manual/pipeline/outputs/opentelemetry** +The OpenTelemetry plugin allows you to take logs, metrics, and traces from Fluent Bit and submit them to an OpenTelemetry HTTP endpoint.
**For full documentation, refer to https://docs.fluentbit.io/manual/pipeline/outputs/opentelemetry** | Field | Description | Scheme | @@ -10,7 +10,9 @@ OpenTelemetry is An output plugin to submit Metrics to an OpenTelemetry endpoint | httpUser | Optional username credential for access | *[plugins.Secret](../secret.md) | | httpPassword | Password for user defined in HTTP_User | *[plugins.Secret](../secret.md) | | proxy | Specify an HTTP Proxy. The expected format of this value is http://HOST:PORT. Note that HTTPS is not currently supported. It is recommended not to set this and to configure the HTTP proxy environment variables instead as they support both HTTP and HTTPS. | string | -| uri | Specify an optional HTTP URI for the target web server, e.g: /something | string | +| metricsUri | Specify an optional HTTP URI for the target web server listening for metrics, e.g: /v1/metrics | string | +| logsUri | Specify an optional HTTP URI for the target web server listening for logs, e.g: /v1/logs | string | +| tracesUri | Specify an optional HTTP URI for the target web server listening for traces, e.g: /v1/traces | string | | header | Add a HTTP header key/value pair. Multiple headers can be set. | map[string]string | | logResponsePayload | Log the response payload within the Fluent Bit log. | *bool | | addLabel | This allows you to add custom labels to all metrics exposed through the OpenTelemetry exporter. You may have multiple of these fields. | map[string]string | diff --git a/docs/plugins/fluentbit/secret.md b/docs/plugins/fluentbit/secret.md index 682ee2e4d..541ecdcb2 100644 --- a/docs/plugins/fluentbit/secret.md +++ b/docs/plugins/fluentbit/secret.md @@ -14,3 +14,11 @@ ValueSource defines how to find a value's key. | Field | Description | Scheme | | ----- | ----------- | ------ | | secretKeyRef | Selects a key of a secret in the pod's namespace | [corev1.SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#secretkeyselector-v1-core) | +# SecretLoader + + + + +| Field | Description | Scheme | +| ----- | ----------- | ------ | +| Client | | client.Client | From 8cda6504cd31e4a8bc485710f0d7e63d934627d1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 May 2023 15:26:54 +0800 Subject: [PATCH 14/78] build(deps): Bump helm/chart-testing-action from 2.1.0 to 2.4.0 (#710) Bumps [helm/chart-testing-action](https://github.com/helm/chart-testing-action) from 2.1.0 to 2.4.0. - [Release notes](https://github.com/helm/chart-testing-action/releases) - [Commits](https://github.com/helm/chart-testing-action/compare/v2.1.0...v2.4.0) --- updated-dependencies: - dependency-name: helm/chart-testing-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/lint-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 03ec7095a..9665ac9d5 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -24,7 +24,7 @@ jobs: python-version: 3.7 - name: Set up chart-testing - uses: helm/chart-testing-action@v2.1.0 + uses: helm/chart-testing-action@v2.4.0 - name: Run chart-testing (list-changed) id: list-changed From fac16e5afd219ca958ee614662148ddfab85fbd7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 May 2023 15:27:44 +0800 Subject: [PATCH 15/78] build(deps): Bump k8s.io/klog/v2 from 2.90.1 to 2.100.1 (#712) Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.90.1 to 2.100.1. - [Release notes](https://github.com/kubernetes/klog/releases) - [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes/klog/compare/v2.90.1...v2.100.1) --- updated-dependencies: - dependency-name: k8s.io/klog/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 6 +----- go.sum | 15 ++------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/go.mod b/go.mod index 95e53d6bb..dd2f8ffdd 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( k8s.io/api v0.26.3 k8s.io/apimachinery v0.27.1 k8s.io/client-go v0.26.3 - k8s.io/klog/v2 v2.90.1 + k8s.io/klog/v2 v2.100.1 sigs.k8s.io/controller-runtime v0.14.6 sigs.k8s.io/yaml v1.3.0 ) @@ -58,14 +58,12 @@ require ( go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.7.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/mod v0.9.0 // indirect golang.org/x/net v0.8.0 // indirect golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect golang.org/x/sys v0.6.0 // indirect golang.org/x/term v0.6.0 // indirect golang.org/x/text v0.8.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.7.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.28.1 // indirect @@ -74,9 +72,7 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.26.1 // indirect - k8s.io/code-generator v0.26.1 // indirect k8s.io/component-base v0.26.1 // indirect - k8s.io/gengo v0.0.0-20220902162205-c0856e24416d // indirect k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a // indirect k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect diff --git a/go.sum b/go.sum index cf28da8f1..297d484a9 100644 --- a/go.sum +++ b/go.sum @@ -89,7 +89,6 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= @@ -350,8 +349,6 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= -golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -506,7 +503,6 @@ golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjs golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -517,7 +513,6 @@ golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= -golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -645,15 +640,10 @@ k8s.io/apimachinery v0.27.1 h1:EGuZiLI95UQQcClhanryclaQE6xjg1Bts6/L3cD7zyc= k8s.io/apimachinery v0.27.1/go.mod h1:5ikh59fK3AJ287GUvpUsryoMFtH9zj/ARfWCo3AyXTM= k8s.io/client-go v0.26.3 h1:k1UY+KXfkxV2ScEL3gilKcF7761xkYsSD6BC9szIu8s= k8s.io/client-go v0.26.3/go.mod h1:ZPNu9lm8/dbRIPAgteN30RSXea6vrCpFvq+MateTUuQ= -k8s.io/code-generator v0.26.1 h1:dusFDsnNSKlMFYhzIM0jAO1OlnTN5WYwQQ+Ai12IIlo= -k8s.io/code-generator v0.26.1/go.mod h1:OMoJ5Dqx1wgaQzKgc+ZWaZPfGjdRq/Y3WubFrZmeI3I= k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= -k8s.io/gengo v0.0.0-20220902162205-c0856e24416d h1:U9tB195lKdzwqicbJvyJeOXV7Klv+wNAWENRnXEGi08= -k8s.io/gengo v0.0.0-20220902162205-c0856e24416d/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= -k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= +k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a h1:gmovKNur38vgoWfGtP5QOGNOA7ki4n6qNYoFAgMlNvg= k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a/go.mod h1:y5VtZWM9sHHc2ZodIH/6SHzXj+TPU5USoA8lcIeKEKY= k8s.io/utils v0.0.0-20230209194617-a36077c30491 h1:r0BAOLElQnnFhE/ApUsg3iHdVYYPBjNSSOMowRZxxsY= @@ -667,6 +657,5 @@ sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMm sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= From a51ca4004944c2126671a5ba2e1205e2d7291f7f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 May 2023 15:32:23 +0800 Subject: [PATCH 16/78] build(deps): Bump golang in /cmd/fluent-watcher/fluentbit (#714) Bumps golang from 1.20.3-alpine3.16 to 1.20.4-alpine3.16. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/fluent-watcher/fluentbit/Dockerfile | 2 +- cmd/fluent-watcher/fluentbit/Dockerfile.debug | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/fluent-watcher/fluentbit/Dockerfile b/cmd/fluent-watcher/fluentbit/Dockerfile index 44b50a73d..7d4a2efb4 100644 --- a/cmd/fluent-watcher/fluentbit/Dockerfile +++ b/cmd/fluent-watcher/fluentbit/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.20.3-alpine3.16 as buildergo +FROM golang:1.20.4-alpine3.16 as buildergo RUN mkdir -p /fluent-bit RUN mkdir -p /code COPY . /code/ diff --git a/cmd/fluent-watcher/fluentbit/Dockerfile.debug b/cmd/fluent-watcher/fluentbit/Dockerfile.debug index 3e38b9f5a..0ec227ac7 100644 --- a/cmd/fluent-watcher/fluentbit/Dockerfile.debug +++ b/cmd/fluent-watcher/fluentbit/Dockerfile.debug @@ -1,4 +1,4 @@ -FROM golang:1.20.3-alpine3.16 as buildergo +FROM golang:1.20.4-alpine3.16 as buildergo RUN mkdir -p /fluent-bit RUN mkdir -p /code COPY . /code/ From 9f17db320261194c4a0a04968bd81165a747b71f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 May 2023 15:41:41 +0800 Subject: [PATCH 17/78] build(deps): Bump golang in /cmd/fluent-manager (#713) Bumps golang from 1.20.3-alpine3.17 to 1.20.4-alpine3.17. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/fluent-manager/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/fluent-manager/Dockerfile b/cmd/fluent-manager/Dockerfile index 0c4df90dd..6a8ff6561 100644 --- a/cmd/fluent-manager/Dockerfile +++ b/cmd/fluent-manager/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM --platform=$BUILDPLATFORM golang:1.20.3-alpine3.17 as builder +FROM --platform=$BUILDPLATFORM golang:1.20.4-alpine3.17 as builder WORKDIR /workspace # Copy the Go Modules manifests From c45061a3d2ecb1d18f97aa2a577ad15ca4481198 Mon Sep 17 00:00:00 2001 From: Benjamin Huo Date: Thu, 4 May 2023 15:42:38 +0800 Subject: [PATCH 18/78] Adjust fluentd watcher dependabot (#716) Signed-off-by: Benjamin Huo --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f28b0a6a3..a38c06192 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -13,7 +13,7 @@ updates: schedule: interval: "daily" - package-ecosystem: "docker" - directory: "/cmd/fluent-watcher/fluentd/base" + directory: "/cmd/fluent-watcher/fluentd" schedule: interval: "daily" - package-ecosystem: "docker" From 8b69310d140c8eb358197afc81a83cf84acac430 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 May 2023 15:52:46 +0800 Subject: [PATCH 19/78] build(deps): Bump alpine in /cmd/fluent-watcher/fluentd (#719) Bumps alpine from 3.16 to 3.17. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/fluent-watcher/fluentd/Dockerfile.amd64 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/fluent-watcher/fluentd/Dockerfile.amd64 b/cmd/fluent-watcher/fluentd/Dockerfile.amd64 index 2d87efce5..b82fa6812 100644 --- a/cmd/fluent-watcher/fluentd/Dockerfile.amd64 +++ b/cmd/fluent-watcher/fluentd/Dockerfile.amd64 @@ -8,7 +8,7 @@ RUN echo $(ls -al /code) RUN CGO_ENABLED=0 go build -i -ldflags '-w -s' -o /fluentd/fluentd-watcher /code/cmd/fluent-watcher/fluentd/main.go # Fluentd main image -FROM alpine:3.16 +FROM alpine:3.17 LABEL Description="Fluentd docker image" Vendor="Fluent Organization" Version="1.15.3" # Do not split this into multiple RUN! From f4e408b049f87d544302cf1edff7332de5e1683a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 May 2023 15:56:13 +0800 Subject: [PATCH 20/78] build(deps): Bump golang in /cmd/fluent-watcher/fluentd (#717) Bumps golang from 1.19.2-alpine3.16 to 1.20.4-alpine3.16. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/fluent-watcher/fluentd/Dockerfile.amd64 | 2 +- cmd/fluent-watcher/fluentd/Dockerfile.arm64 | 2 +- cmd/fluent-watcher/fluentd/Dockerfile.arm64.quick | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/fluent-watcher/fluentd/Dockerfile.amd64 b/cmd/fluent-watcher/fluentd/Dockerfile.amd64 index b82fa6812..07b31da72 100644 --- a/cmd/fluent-watcher/fluentd/Dockerfile.amd64 +++ b/cmd/fluent-watcher/fluentd/Dockerfile.amd64 @@ -1,5 +1,5 @@ # Fluentd watcher agent -FROM golang:1.19.2-alpine3.16 as buildergo +FROM golang:1.20.4-alpine3.16 as buildergo RUN mkdir -p /fluentd RUN mkdir -p /code COPY . /code/ diff --git a/cmd/fluent-watcher/fluentd/Dockerfile.arm64 b/cmd/fluent-watcher/fluentd/Dockerfile.arm64 index c2d33e3fa..213c27520 100644 --- a/cmd/fluent-watcher/fluentd/Dockerfile.arm64 +++ b/cmd/fluent-watcher/fluentd/Dockerfile.arm64 @@ -1,5 +1,5 @@ # Fluentd watcher agent -FROM golang:1.19.2-alpine3.16 as buildergo +FROM golang:1.20.4-alpine3.16 as buildergo RUN mkdir -p /fluentd RUN mkdir -p /code COPY . /code/ diff --git a/cmd/fluent-watcher/fluentd/Dockerfile.arm64.quick b/cmd/fluent-watcher/fluentd/Dockerfile.arm64.quick index d42cf53dc..6fb85a118 100644 --- a/cmd/fluent-watcher/fluentd/Dockerfile.arm64.quick +++ b/cmd/fluent-watcher/fluentd/Dockerfile.arm64.quick @@ -1,5 +1,5 @@ # Fluentd watcher agent -FROM golang:1.19.2-alpine3.16 as buildergo +FROM golang:1.20.4-alpine3.16 as buildergo RUN mkdir -p /fluentd RUN mkdir -p /code COPY . /code/ From 78a79f91cfa780e7cd994981afd7b5c622952ff2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 May 2023 15:58:38 +0800 Subject: [PATCH 21/78] build(deps): Bump golang in /docs/best-practice/forwarding-logs-via-http (#715) Bumps golang from 1.20.2 to 1.20.4. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- docs/best-practice/forwarding-logs-via-http/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/best-practice/forwarding-logs-via-http/Dockerfile b/docs/best-practice/forwarding-logs-via-http/Dockerfile index 9ba65b989..e038d57a1 100644 --- a/docs/best-practice/forwarding-logs-via-http/Dockerfile +++ b/docs/best-practice/forwarding-logs-via-http/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.20.2 as builder +FROM golang:1.20.4 as builder WORKDIR / COPY main.go /go/src/main.go From 0d80a1c89b1f281281dfb2dba43f0bc69637ed79 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 May 2023 16:07:52 +0800 Subject: [PATCH 22/78] build(deps): Bump arm64v8/ruby in /cmd/fluent-watcher/fluentd (#718) Bumps arm64v8/ruby from 3.1-slim-bullseye to 3.2-slim-bullseye. --- updated-dependencies: - dependency-name: arm64v8/ruby dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/fluent-watcher/fluentd/Dockerfile.arm64 | 2 +- cmd/fluent-watcher/fluentd/Dockerfile.arm64.base | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/fluent-watcher/fluentd/Dockerfile.arm64 b/cmd/fluent-watcher/fluentd/Dockerfile.arm64 index 213c27520..101381750 100644 --- a/cmd/fluent-watcher/fluentd/Dockerfile.arm64 +++ b/cmd/fluent-watcher/fluentd/Dockerfile.arm64 @@ -15,7 +15,7 @@ RUN apk add curl --no-cache RUN curl -sL -o qemu-6.0.0.balena1-aarch64.tar.gz https://github.com/balena-io/qemu/releases/download/v6.0.0%2Bbalena1/qemu-6.0.0.balena1-aarch64.tar.gz && echo "$QEMU_DOWNLOAD_SHA256 *qemu-6.0.0.balena1-aarch64.tar.gz" | sha256sum -c - | tar zxvf qemu-6.0.0.balena1-aarch64.tar.gz -C . && mv qemu-6.0.0+balena1-aarch64/qemu-aarch64-static . # Fluentd main image -FROM arm64v8/ruby:3.1-slim-bullseye +FROM arm64v8/ruby:3.2-slim-bullseye COPY --from=builderqemu /go/qemu-aarch64-static /usr/bin/ LABEL Description="Fluentd docker image" Vendor="Fluent Organization" Version="1.15.3" ENV TINI_VERSION=0.18.0 diff --git a/cmd/fluent-watcher/fluentd/Dockerfile.arm64.base b/cmd/fluent-watcher/fluentd/Dockerfile.arm64.base index 76940e408..53c801992 100644 --- a/cmd/fluent-watcher/fluentd/Dockerfile.arm64.base +++ b/cmd/fluent-watcher/fluentd/Dockerfile.arm64.base @@ -6,7 +6,7 @@ RUN apk add curl --no-cache RUN curl -sL -o qemu-6.0.0.balena1-aarch64.tar.gz https://github.com/balena-io/qemu/releases/download/v6.0.0%2Bbalena1/qemu-6.0.0.balena1-aarch64.tar.gz && echo "$QEMU_DOWNLOAD_SHA256 *qemu-6.0.0.balena1-aarch64.tar.gz" | sha256sum -c - | tar zxvf qemu-6.0.0.balena1-aarch64.tar.gz -C . && mv qemu-6.0.0+balena1-aarch64/qemu-aarch64-static . # Fluentd main image -FROM arm64v8/ruby:3.1-slim-bullseye +FROM arm64v8/ruby:3.2-slim-bullseye COPY --from=builderqemu /go/qemu-aarch64-static /usr/bin/ LABEL Description="Fluentd docker image" Vendor="Fluent Organization" Version="1.15.3" ENV TINI_VERSION=0.18.0 From 216f1a45f1d10484e4ef200ea4dffc8e85b7733d Mon Sep 17 00:00:00 2001 From: Benjamin Huo Date: Thu, 4 May 2023 16:58:50 +0800 Subject: [PATCH 23/78] remove the deprecated -i flag in go build (#720) Signed-off-by: Benjamin Huo --- cmd/fluent-watcher/fluentd/Dockerfile.amd64 | 2 +- cmd/fluent-watcher/fluentd/Dockerfile.arm64 | 2 +- cmd/fluent-watcher/fluentd/Dockerfile.arm64.quick | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/fluent-watcher/fluentd/Dockerfile.amd64 b/cmd/fluent-watcher/fluentd/Dockerfile.amd64 index 07b31da72..8fa3aa5bd 100644 --- a/cmd/fluent-watcher/fluentd/Dockerfile.amd64 +++ b/cmd/fluent-watcher/fluentd/Dockerfile.amd64 @@ -5,7 +5,7 @@ RUN mkdir -p /code COPY . /code/ WORKDIR /code RUN echo $(ls -al /code) -RUN CGO_ENABLED=0 go build -i -ldflags '-w -s' -o /fluentd/fluentd-watcher /code/cmd/fluent-watcher/fluentd/main.go +RUN CGO_ENABLED=0 go build -ldflags '-w -s' -o /fluentd/fluentd-watcher /code/cmd/fluent-watcher/fluentd/main.go # Fluentd main image FROM alpine:3.17 diff --git a/cmd/fluent-watcher/fluentd/Dockerfile.arm64 b/cmd/fluent-watcher/fluentd/Dockerfile.arm64 index 101381750..9cf6e7624 100644 --- a/cmd/fluent-watcher/fluentd/Dockerfile.arm64 +++ b/cmd/fluent-watcher/fluentd/Dockerfile.arm64 @@ -5,7 +5,7 @@ RUN mkdir -p /code COPY . /code/ WORKDIR /code RUN echo $(ls -al /code) -RUN CGO_ENABLED=0 go build -i -ldflags '-w -s' -o /fluentd/fluentd-watcher /code/cmd/fluent-watcher/fluentd/main.go +RUN CGO_ENABLED=0 go build -ldflags '-w -s' -o /fluentd/fluentd-watcher /code/cmd/fluent-watcher/fluentd/main.go # To set multiarch build for Docker hub automated build. FROM golang:alpine AS builderqemu diff --git a/cmd/fluent-watcher/fluentd/Dockerfile.arm64.quick b/cmd/fluent-watcher/fluentd/Dockerfile.arm64.quick index 6fb85a118..97946813d 100644 --- a/cmd/fluent-watcher/fluentd/Dockerfile.arm64.quick +++ b/cmd/fluent-watcher/fluentd/Dockerfile.arm64.quick @@ -5,7 +5,7 @@ RUN mkdir -p /code COPY . /code/ WORKDIR /code RUN echo $(ls -al /code) -RUN CGO_ENABLED=0 go build -i -ldflags '-w -s' -o /fluentd/fluentd-watcher /code/cmd/fluent-watcher/fluentd/main.go +RUN CGO_ENABLED=0 go build -ldflags '-w -s' -o /fluentd/fluentd-watcher /code/cmd/fluent-watcher/fluentd/main.go # Fluentd main image FROM kubesphere/fluentd:v1.15.3-arm64-base From a93283e732c567dbc6f19650e7368a7d9c5f902b Mon Sep 17 00:00:00 2001 From: Benjamin Huo Date: Thu, 4 May 2023 17:50:49 +0800 Subject: [PATCH 24/78] Adjust fluentd arm64 image build timeout (#721) Signed-off-by: Benjamin Huo --- .github/workflows/build-fd-image.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-fd-image.yaml b/.github/workflows/build-fd-image.yaml index 3151a165e..d53f06f40 100644 --- a/.github/workflows/build-fd-image.yaml +++ b/.github/workflows/build-fd-image.yaml @@ -51,7 +51,7 @@ jobs: build-arm64: runs-on: ubuntu-latest - timeout-minutes: 45 + timeout-minutes: 90 name: Build arm64 Image for Fluentd steps: - name: Install Go @@ -79,7 +79,7 @@ jobs: id: buildx uses: docker/setup-buildx-action@v2 - - name: Build and Push arm64 Image for Fluentd + - name: Build and Push arm64 base Image for Fluentd run: | make build-fd-arm64-base -e FD_IMG_BASE=${{ env.FD_IMG_BASE }} From 0ecb23a135151b8aa466389f4b866dcff1d89bc4 Mon Sep 17 00:00:00 2001 From: dehaocheng Date: Sat, 6 May 2023 14:27:34 +0800 Subject: [PATCH 25/78] Fluent-bit upgrade to v2.1.2 Signed-off-by: dehaocheng --- .github/workflows/build-fb-image.yaml | 4 ++-- Makefile | 4 ++-- charts/fluent-operator/values.yaml | 2 +- cmd/fluent-watcher/fluentbit/Dockerfile | 2 +- cmd/fluent-watcher/fluentbit/Dockerfile.debug | 2 +- manifests/kubeedge/fluentbit-fluentbit-edge.yaml | 2 +- manifests/logging-stack/fluentbit-fluentBit.yaml | 2 +- manifests/quick-start/fluentbit.yaml | 2 +- manifests/regex-parser/fluentbit-fluentBit.yaml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-fb-image.yaml b/.github/workflows/build-fb-image.yaml index bf6fb3f7e..d1bf7821f 100644 --- a/.github/workflows/build-fb-image.yaml +++ b/.github/workflows/build-fb-image.yaml @@ -13,8 +13,8 @@ on: - "pkg/filenotify/**" env: - FB_IMG: 'kubesphere/fluent-bit:v2.0.11' - FB_IMG_DEBUG: 'kubesphere/fluent-bit:v2.0.11-debug' + FB_IMG: 'kubesphere/fluent-bit:v2.1.2' + FB_IMG_DEBUG: 'kubesphere/fluent-bit:v2.1.2-debug' jobs: build: diff --git a/Makefile b/Makefile index 2ecf8999e..d9f72d155 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ VERSION?=$(shell cat VERSION | tr -d " \t\n\r") # Image URL to use all building/pushing image targets -FB_IMG ?= kubesphere/fluent-bit:v2.0.11 -FB_IMG_DEBUG ?= kubesphere/fluent-bit:v2.0.11-debug +FB_IMG ?= kubesphere/fluent-bit:v2.1.2 +FB_IMG_DEBUG ?= kubesphere/fluent-bit:v2.1.2-debug FD_IMG ?= kubesphere/fluentd:v1.15.3 FO_IMG ?= kubesphere/fluent-operator:$(VERSION) FD_IMG_BASE ?= kubesphere/fluentd:v1.15.3-arm64-base diff --git a/charts/fluent-operator/values.yaml b/charts/fluent-operator/values.yaml index e85202de0..00424d7f7 100644 --- a/charts/fluent-operator/values.yaml +++ b/charts/fluent-operator/values.yaml @@ -61,7 +61,7 @@ fluentbit: enable: true image: repository: "kubesphere/fluent-bit" - tag: "v2.0.11" + tag: "v2.1.2" # fluentbit resources. If you do want to specify resources, adjust them as necessary # You can adjust it based on the log volume. resources: diff --git a/cmd/fluent-watcher/fluentbit/Dockerfile b/cmd/fluent-watcher/fluentbit/Dockerfile index 7d4a2efb4..3d98cab13 100644 --- a/cmd/fluent-watcher/fluentbit/Dockerfile +++ b/cmd/fluent-watcher/fluentbit/Dockerfile @@ -6,7 +6,7 @@ WORKDIR /code RUN echo $(ls -al /code) RUN CGO_ENABLED=0 go build -ldflags '-w -s' -o /fluent-bit/fluent-bit /code/cmd/fluent-watcher/fluentbit/main.go -FROM fluent/fluent-bit:2.0.11 +FROM fluent/fluent-bit:2.1.2 LABEL Description="Fluent Bit docker image" Vendor="Fluent" Version="1.0" COPY conf/fluent-bit.conf conf/parsers.conf /fluent-bit/etc/ diff --git a/cmd/fluent-watcher/fluentbit/Dockerfile.debug b/cmd/fluent-watcher/fluentbit/Dockerfile.debug index 0ec227ac7..b8eb4e911 100644 --- a/cmd/fluent-watcher/fluentbit/Dockerfile.debug +++ b/cmd/fluent-watcher/fluentbit/Dockerfile.debug @@ -6,7 +6,7 @@ WORKDIR /code RUN echo $(ls -al /code) RUN CGO_ENABLED=0 go build -ldflags '-w -s' -o /fluent-bit/fluent-bit /code/cmd/fluent-watcher/fluentbit/main.go -FROM fluent/fluent-bit:2.0.11-debug +FROM fluent/fluent-bit:2.1.2-debug LABEL Description="Fluent Bit docker image" Vendor="Fluent" Version="1.0" COPY conf/fluent-bit.conf conf/parsers.conf /fluent-bit/etc/ diff --git a/manifests/kubeedge/fluentbit-fluentbit-edge.yaml b/manifests/kubeedge/fluentbit-fluentbit-edge.yaml index 5258945f1..2ad58169f 100644 --- a/manifests/kubeedge/fluentbit-fluentbit-edge.yaml +++ b/manifests/kubeedge/fluentbit-fluentbit-edge.yaml @@ -6,7 +6,7 @@ metadata: labels: app.kubernetes.io/name: fluent-bit spec: - image: kubesphere/fluent-bit:v2.0.11 + image: kubesphere/fluent-bit:v2.1.2 positionDB: hostPath: path: /var/lib/fluent-bit/ diff --git a/manifests/logging-stack/fluentbit-fluentBit.yaml b/manifests/logging-stack/fluentbit-fluentBit.yaml index 45e378573..aa13497cb 100644 --- a/manifests/logging-stack/fluentbit-fluentBit.yaml +++ b/manifests/logging-stack/fluentbit-fluentBit.yaml @@ -6,7 +6,7 @@ metadata: labels: app.kubernetes.io/name: fluent-bit spec: - image: kubesphere/fluent-bit:v2.0.11 + image: kubesphere/fluent-bit:v2.1.2 positionDB: hostPath: path: /var/lib/fluent-bit/ diff --git a/manifests/quick-start/fluentbit.yaml b/manifests/quick-start/fluentbit.yaml index 20dd731a7..2ebca63fb 100644 --- a/manifests/quick-start/fluentbit.yaml +++ b/manifests/quick-start/fluentbit.yaml @@ -6,7 +6,7 @@ metadata: labels: app.kubernetes.io/name: fluent-bit spec: - image: kubesphere/fluent-bit:v2.0.11 + image: kubesphere/fluent-bit:v2.1.2 fluentBitConfigName: fluent-bit-config --- diff --git a/manifests/regex-parser/fluentbit-fluentBit.yaml b/manifests/regex-parser/fluentbit-fluentBit.yaml index 6945437cc..ff9ca44c1 100644 --- a/manifests/regex-parser/fluentbit-fluentBit.yaml +++ b/manifests/regex-parser/fluentbit-fluentBit.yaml @@ -6,5 +6,5 @@ metadata: labels: app.kubernetes.io/name: fluent-bit spec: - image: kubesphere/fluent-bit:v2.0.11 + image: kubesphere/fluent-bit:v2.1.2 fluentBitConfigName: fluent-bit-config From 49a32016e3e3acbcaacb8f020617a41c5b238327 Mon Sep 17 00:00:00 2001 From: Lewis <24735903+lewis262626@users.noreply.github.com> Date: Sat, 6 May 2023 20:50:05 +0100 Subject: [PATCH 26/78] Fix(docs): Update cluster outputs docs link The link to the GitHub path containing all outputs plugins has changed from `clusteroutput` to `output. Update link in Helm values file to correct link. Signed-off-by: Lewis <24735903+lewis262626@users.noreply.github.com> --- charts/fluent-operator/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/fluent-operator/values.yaml b/charts/fluent-operator/values.yaml index 00424d7f7..d441805cf 100644 --- a/charts/fluent-operator/values.yaml +++ b/charts/fluent-operator/values.yaml @@ -150,7 +150,7 @@ fluentbit: # Configure the output plugin parameter in FluentBit. # You can set enable to true to output logs to the specified location. output: - # You can find more supported output plugins here: https://github.com/fluent/fluent-operator/tree/master/docs/plugins/fluentbit/clusteroutput + # You can find more supported output plugins here: https://github.com/fluent/fluent-operator/tree/master/docs/plugins/fluentbit/output es: enable: false host: "" @@ -253,4 +253,4 @@ fluentd: nameOverride: "" fullnameOverride: "" -namespaceOverride: "" \ No newline at end of file +namespaceOverride: "" From 1e907c611b6c5b9b2cfc24f73e2ea24d5b74e84e Mon Sep 17 00:00:00 2001 From: Oleg Pykhalov Date: Thu, 4 May 2023 14:54:17 +0300 Subject: [PATCH 27/78] Add fluentbit.affinity configuration Signed-off-by: Oleg Pykhalov --- charts/fluent-operator/Chart.yaml | 2 +- .../fluent-operator/templates/fluentbit-fluentBit.yaml | 9 +++------ charts/fluent-operator/values.yaml | 8 ++++++++ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/charts/fluent-operator/Chart.yaml b/charts/fluent-operator/Chart.yaml index 7067f4bb4..05c02ce7b 100644 --- a/charts/fluent-operator/Chart.yaml +++ b/charts/fluent-operator/Chart.yaml @@ -15,7 +15,7 @@ description: A Helm chart for Kubernetes # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 2.2.0 +version: 2.2.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/fluent-operator/templates/fluentbit-fluentBit.yaml b/charts/fluent-operator/templates/fluentbit-fluentBit.yaml index 1038ef609..aa6807c65 100644 --- a/charts/fluent-operator/templates/fluentbit-fluentBit.yaml +++ b/charts/fluent-operator/templates/fluentbit-fluentBit.yaml @@ -33,13 +33,10 @@ spec: {{- if .Values.fluentbit.priorityClassName }} priorityClassName: {{ .Values.fluentbit.priorityClassName | quote }} {{- end }} + {{- with .Values.fluentbit.affinity }} affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: node-role.kubernetes.io/edge - operator: DoesNotExist +{{ toYaml . | indent 4 }} + {{- end }} {{- if .Values.fluentbit.secrets }} secrets: {{ toYaml .Values.fluentbit.secrets | indent 4 }} diff --git a/charts/fluent-operator/values.yaml b/charts/fluent-operator/values.yaml index d441805cf..6b325d4f7 100644 --- a/charts/fluent-operator/values.yaml +++ b/charts/fluent-operator/values.yaml @@ -91,6 +91,14 @@ fluentbit: additionalVolumes: [] # Pod volumes to mount into the container's filesystem. additionalVolumesMounts: [] + # affinity configuration for Fluent Bit pods. Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: node-role.kubernetes.io/edge + operator: DoesNotExist # nodeSelector configuration for Fluent Bit pods. Ref: https://kubernetes.io/docs/user-guide/node-selection/ nodeSelector: {} # Node tolerations applied to Fluent Bit pods. Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ From 455f0884b2951a2de3c8146d5593953e952107f3 Mon Sep 17 00:00:00 2001 From: Benjamin Huo Date: Tue, 16 May 2023 13:54:00 +0800 Subject: [PATCH 28/78] Adjust edge metrics collection config (#736) Signed-off-by: Benjamin Huo --- .../templates/fluentbit-input-node-exporter-metrics-edge.yaml | 4 ++-- .../fluentbit-input-prometheus-scrape-metrics-edge.yaml | 4 ++-- .../fluentbit-output-prometheus-remote-write-edge.yaml | 2 +- manifests/kubeedge/input-node-exporter-metrics-edge.yaml | 4 ++-- manifests/kubeedge/input-prometheus-scrape-metrics-edge.yaml | 4 ++-- manifests/kubeedge/output-prometheus-remote-write-edge.yaml | 2 +- manifests/kubeedge/output-stdout-edge.yaml | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/charts/fluent-operator/templates/fluentbit-input-node-exporter-metrics-edge.yaml b/charts/fluent-operator/templates/fluentbit-input-node-exporter-metrics-edge.yaml index ee006aadd..78ea5f1d1 100644 --- a/charts/fluent-operator/templates/fluentbit-input-node-exporter-metrics-edge.yaml +++ b/charts/fluent-operator/templates/fluentbit-input-node-exporter-metrics-edge.yaml @@ -8,8 +8,8 @@ metadata: node-role.kubernetes.io/edge: "true" spec: nodeExporterMetrics: - tag: kubeedge.* - scrapeInterval: 30s + tag: kubeedge.metrics.* + scrapeInterval: 1m path : procfs: /host/proc sysfs : /host/sys diff --git a/charts/fluent-operator/templates/fluentbit-input-prometheus-scrape-metrics-edge.yaml b/charts/fluent-operator/templates/fluentbit-input-prometheus-scrape-metrics-edge.yaml index f5c63502b..78f902e37 100644 --- a/charts/fluent-operator/templates/fluentbit-input-prometheus-scrape-metrics-edge.yaml +++ b/charts/fluent-operator/templates/fluentbit-input-prometheus-scrape-metrics-edge.yaml @@ -8,9 +8,9 @@ metadata: node-role.kubernetes.io/edge: "true" spec: prometheusScrapeMetrics: - tag: kubeedge.* + tag: kubeedge.metrics.* host: 127.0.0.1 port: 10350 - scrapeInterval: 30s + scrapeInterval: 1m metricsPath : /metrics/cadvisor {{- end }} \ No newline at end of file diff --git a/charts/fluent-operator/templates/fluentbit-output-prometheus-remote-write-edge.yaml b/charts/fluent-operator/templates/fluentbit-output-prometheus-remote-write-edge.yaml index a1a218f5a..9c98a1a99 100644 --- a/charts/fluent-operator/templates/fluentbit-output-prometheus-remote-write-edge.yaml +++ b/charts/fluent-operator/templates/fluentbit-output-prometheus-remote-write-edge.yaml @@ -7,7 +7,7 @@ metadata: fluentbit.fluent.io/enabled: "true" node-role.kubernetes.io/edge: "true" spec: - matchRegex: (?:kubeedge|service)\.(.*) + match: kubeedge.metrics.* prometheusRemoteWrite: host: {{ .Values.fluentbit.edge.prometheusRemoteWrite.host }} port: {{ .Values.fluentbit.edge.prometheusRemoteWrite.port }} diff --git a/manifests/kubeedge/input-node-exporter-metrics-edge.yaml b/manifests/kubeedge/input-node-exporter-metrics-edge.yaml index 9e53d10b5..e6750a20f 100644 --- a/manifests/kubeedge/input-node-exporter-metrics-edge.yaml +++ b/manifests/kubeedge/input-node-exporter-metrics-edge.yaml @@ -7,8 +7,8 @@ metadata: node-role.kubernetes.io/edge: "true" spec: nodeExporterMetrics: - tag: kubeedge.* - scrapeInterval: 30s + tag: kubeedge.metrics.* + scrapeInterval: 1m path : procfs: /host/proc sysfs : /host/sys diff --git a/manifests/kubeedge/input-prometheus-scrape-metrics-edge.yaml b/manifests/kubeedge/input-prometheus-scrape-metrics-edge.yaml index b4d67abc3..f3bb6890e 100644 --- a/manifests/kubeedge/input-prometheus-scrape-metrics-edge.yaml +++ b/manifests/kubeedge/input-prometheus-scrape-metrics-edge.yaml @@ -7,8 +7,8 @@ metadata: node-role.kubernetes.io/edge: "true" spec: prometheusScrapeMetrics: - tag: kubeedge.* + tag: kubeedge.metrics.* host: 127.0.0.1 port: 10350 - scrapeInterval: 30s + scrapeInterval: 1m metricsPath : /metrics/cadvisor diff --git a/manifests/kubeedge/output-prometheus-remote-write-edge.yaml b/manifests/kubeedge/output-prometheus-remote-write-edge.yaml index 08e3d46e2..dc88f45e8 100644 --- a/manifests/kubeedge/output-prometheus-remote-write-edge.yaml +++ b/manifests/kubeedge/output-prometheus-remote-write-edge.yaml @@ -6,7 +6,7 @@ metadata: fluentbit.fluent.io/enabled: "true" node-role.kubernetes.io/edge: "true" spec: - matchRegex: (?:kubeedge|service)\.(.*) + match: kubeedge.metrics.* prometheusRemoteWrite: host: port: diff --git a/manifests/kubeedge/output-stdout-edge.yaml b/manifests/kubeedge/output-stdout-edge.yaml index 1fbaeacb3..cd7847036 100644 --- a/manifests/kubeedge/output-stdout-edge.yaml +++ b/manifests/kubeedge/output-stdout-edge.yaml @@ -6,6 +6,6 @@ metadata: fluentbit.fluent.io/enabled: "true" node-role.kubernetes.io/edge: "true" spec: - matchRegex: (?:kubeedge|service)\.(.*) + match: kubeedge.metrics.* stdout: format: msgpack From 0dcbab97f0841ceb311cb32ec8aed9394d9bd02a Mon Sep 17 00:00:00 2001 From: dehaocheng Date: Sun, 21 May 2023 13:25:31 +0800 Subject: [PATCH 29/78] Fluent-bit upgrade to v2.1.2 Signed-off-by: dehaocheng --- .github/workflows/build-fb-image.yaml | 4 ++-- Makefile | 4 ++-- charts/fluent-operator/values.yaml | 2 +- cmd/fluent-watcher/fluentbit/Dockerfile | 2 +- cmd/fluent-watcher/fluentbit/Dockerfile.debug | 2 +- manifests/kubeedge/fluentbit-fluentbit-edge.yaml | 2 +- manifests/logging-stack/fluentbit-fluentBit.yaml | 2 +- manifests/quick-start/fluentbit.yaml | 2 +- manifests/regex-parser/fluentbit-fluentBit.yaml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-fb-image.yaml b/.github/workflows/build-fb-image.yaml index d1bf7821f..84a2aeb81 100644 --- a/.github/workflows/build-fb-image.yaml +++ b/.github/workflows/build-fb-image.yaml @@ -13,8 +13,8 @@ on: - "pkg/filenotify/**" env: - FB_IMG: 'kubesphere/fluent-bit:v2.1.2' - FB_IMG_DEBUG: 'kubesphere/fluent-bit:v2.1.2-debug' + FB_IMG: 'kubesphere/fluent-bit:v2.1.3' + FB_IMG_DEBUG: 'kubesphere/fluent-bit:v2.1.3-debug' jobs: build: diff --git a/Makefile b/Makefile index d9f72d155..bbf952afd 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ VERSION?=$(shell cat VERSION | tr -d " \t\n\r") # Image URL to use all building/pushing image targets -FB_IMG ?= kubesphere/fluent-bit:v2.1.2 -FB_IMG_DEBUG ?= kubesphere/fluent-bit:v2.1.2-debug +FB_IMG ?= kubesphere/fluent-bit:v2.1.3 +FB_IMG_DEBUG ?= kubesphere/fluent-bit:v2.1.3-debug FD_IMG ?= kubesphere/fluentd:v1.15.3 FO_IMG ?= kubesphere/fluent-operator:$(VERSION) FD_IMG_BASE ?= kubesphere/fluentd:v1.15.3-arm64-base diff --git a/charts/fluent-operator/values.yaml b/charts/fluent-operator/values.yaml index 6b325d4f7..3524a6c1c 100644 --- a/charts/fluent-operator/values.yaml +++ b/charts/fluent-operator/values.yaml @@ -61,7 +61,7 @@ fluentbit: enable: true image: repository: "kubesphere/fluent-bit" - tag: "v2.1.2" + tag: "v2.1.3" # fluentbit resources. If you do want to specify resources, adjust them as necessary # You can adjust it based on the log volume. resources: diff --git a/cmd/fluent-watcher/fluentbit/Dockerfile b/cmd/fluent-watcher/fluentbit/Dockerfile index 3d98cab13..fb65abff8 100644 --- a/cmd/fluent-watcher/fluentbit/Dockerfile +++ b/cmd/fluent-watcher/fluentbit/Dockerfile @@ -6,7 +6,7 @@ WORKDIR /code RUN echo $(ls -al /code) RUN CGO_ENABLED=0 go build -ldflags '-w -s' -o /fluent-bit/fluent-bit /code/cmd/fluent-watcher/fluentbit/main.go -FROM fluent/fluent-bit:2.1.2 +FROM fluent/fluent-bit:2.1.3 LABEL Description="Fluent Bit docker image" Vendor="Fluent" Version="1.0" COPY conf/fluent-bit.conf conf/parsers.conf /fluent-bit/etc/ diff --git a/cmd/fluent-watcher/fluentbit/Dockerfile.debug b/cmd/fluent-watcher/fluentbit/Dockerfile.debug index b8eb4e911..acbe5ad66 100644 --- a/cmd/fluent-watcher/fluentbit/Dockerfile.debug +++ b/cmd/fluent-watcher/fluentbit/Dockerfile.debug @@ -6,7 +6,7 @@ WORKDIR /code RUN echo $(ls -al /code) RUN CGO_ENABLED=0 go build -ldflags '-w -s' -o /fluent-bit/fluent-bit /code/cmd/fluent-watcher/fluentbit/main.go -FROM fluent/fluent-bit:2.1.2-debug +FROM fluent/fluent-bit:2.1.3-debug LABEL Description="Fluent Bit docker image" Vendor="Fluent" Version="1.0" COPY conf/fluent-bit.conf conf/parsers.conf /fluent-bit/etc/ diff --git a/manifests/kubeedge/fluentbit-fluentbit-edge.yaml b/manifests/kubeedge/fluentbit-fluentbit-edge.yaml index 2ad58169f..90e0804b1 100644 --- a/manifests/kubeedge/fluentbit-fluentbit-edge.yaml +++ b/manifests/kubeedge/fluentbit-fluentbit-edge.yaml @@ -6,7 +6,7 @@ metadata: labels: app.kubernetes.io/name: fluent-bit spec: - image: kubesphere/fluent-bit:v2.1.2 + image: kubesphere/fluent-bit:v2.1.3 positionDB: hostPath: path: /var/lib/fluent-bit/ diff --git a/manifests/logging-stack/fluentbit-fluentBit.yaml b/manifests/logging-stack/fluentbit-fluentBit.yaml index aa13497cb..606871053 100644 --- a/manifests/logging-stack/fluentbit-fluentBit.yaml +++ b/manifests/logging-stack/fluentbit-fluentBit.yaml @@ -6,7 +6,7 @@ metadata: labels: app.kubernetes.io/name: fluent-bit spec: - image: kubesphere/fluent-bit:v2.1.2 + image: kubesphere/fluent-bit:v2.1.3 positionDB: hostPath: path: /var/lib/fluent-bit/ diff --git a/manifests/quick-start/fluentbit.yaml b/manifests/quick-start/fluentbit.yaml index 2ebca63fb..8afa784da 100644 --- a/manifests/quick-start/fluentbit.yaml +++ b/manifests/quick-start/fluentbit.yaml @@ -6,7 +6,7 @@ metadata: labels: app.kubernetes.io/name: fluent-bit spec: - image: kubesphere/fluent-bit:v2.1.2 + image: kubesphere/fluent-bit:v2.1.3 fluentBitConfigName: fluent-bit-config --- diff --git a/manifests/regex-parser/fluentbit-fluentBit.yaml b/manifests/regex-parser/fluentbit-fluentBit.yaml index ff9ca44c1..af204b93f 100644 --- a/manifests/regex-parser/fluentbit-fluentBit.yaml +++ b/manifests/regex-parser/fluentbit-fluentBit.yaml @@ -6,5 +6,5 @@ metadata: labels: app.kubernetes.io/name: fluent-bit spec: - image: kubesphere/fluent-bit:v2.1.2 + image: kubesphere/fluent-bit:v2.1.3 fluentBitConfigName: fluent-bit-config From f906bcaa2853cab52b6953b6ebef9d61e50d045d Mon Sep 17 00:00:00 2001 From: adiforluls Date: Sun, 21 May 2023 13:49:54 +0530 Subject: [PATCH 30/78] add some fluentbit helm opts Signed-off-by: adiforluls --- .../templates/fluentbit-clusterinput-tail.yaml | 1 + charts/fluent-operator/templates/fluentbit-fluentBit.yaml | 4 ++++ charts/fluent-operator/values.yaml | 3 +++ 3 files changed, 8 insertions(+) diff --git a/charts/fluent-operator/templates/fluentbit-clusterinput-tail.yaml b/charts/fluent-operator/templates/fluentbit-clusterinput-tail.yaml index 2b1490cc1..d2c36e323 100644 --- a/charts/fluent-operator/templates/fluentbit-clusterinput-tail.yaml +++ b/charts/fluent-operator/templates/fluentbit-clusterinput-tail.yaml @@ -12,6 +12,7 @@ spec: tail: tag: kube.* path: {{ .Values.fluentbit.input.tail.path }} + readFromHead: {{ .Values.fluentbit.input.tail.readFromHead }} {{- if eq .Values.containerRuntime "docker" }} parser: docker {{- else if eq .Values.containerRuntime "containerd" }} diff --git a/charts/fluent-operator/templates/fluentbit-fluentBit.yaml b/charts/fluent-operator/templates/fluentbit-fluentBit.yaml index aa6807c65..b538a90a0 100644 --- a/charts/fluent-operator/templates/fluentbit-fluentBit.yaml +++ b/charts/fluent-operator/templates/fluentbit-fluentBit.yaml @@ -18,6 +18,10 @@ spec: resources: {{- toYaml .Values.fluentbit.resources | nindent 4 }} fluentBitConfigName: fluent-bit-config + {{- if .Values.fluentbit.namespaceFluentBitCfgSelector }} + namespaceFluentBitCfgSelector: +{{ toYaml .Values.fluentbit.namespaceFluentBitCfgSelector | indent 4 }} + {{- end }} {{- if .Values.fluentbit.envVars }} envVars: {{ toYaml .Values.fluentbit.envVars | indent 4 }} diff --git a/charts/fluent-operator/values.yaml b/charts/fluent-operator/values.yaml index 6b325d4f7..aec7a2ad0 100644 --- a/charts/fluent-operator/values.yaml +++ b/charts/fluent-operator/values.yaml @@ -129,6 +129,8 @@ fluentbit: # name: hostProc # readOnly: true + namespaceFluentBitCfgSelector: {} + # Set a limit of memory that Tail plugin can use when appending data to the Engine. # You can find more details here: https://docs.fluentbit.io/manual/pipeline/inputs/tail#config # If the limit is reach, it will be paused; when the data is flushed it resumes. @@ -142,6 +144,7 @@ fluentbit: memBufLimit: 5MB path: "/var/log/containers/*.log" skipLongLines: true + readFromHead: false systemd: enable: true path: "/var/log/journal" From 769f05e9198cdb1ab7d02b929ba99147038c4660 Mon Sep 17 00:00:00 2001 From: Jedrzej Kotkowski Date: Sun, 21 May 2023 22:25:37 +0200 Subject: [PATCH 31/78] dereference pointers in parser filter plugin for fluentd Signed-off-by: Jedrzej Kotkowski --- apis/fluentd/v1alpha1/plugins/filter/types.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/apis/fluentd/v1alpha1/plugins/filter/types.go b/apis/fluentd/v1alpha1/plugins/filter/types.go index 853c3d5ce..662cda31f 100644 --- a/apis/fluentd/v1alpha1/plugins/filter/types.go +++ b/apis/fluentd/v1alpha1/plugins/filter/types.go @@ -192,28 +192,28 @@ func (f *Filter) parserPlugin(parent *params.PluginStore, loader plugins.SecretL } if f.Parser.KeyName != nil { - parent.InsertPairs("key_name", fmt.Sprint(f.Parser.KeyName)) + parent.InsertPairs("key_name", fmt.Sprint(*f.Parser.KeyName)) } if f.Parser.ReserveTime != nil { - parent.InsertPairs("reserve_time", fmt.Sprint(f.Parser.ReserveTime)) + parent.InsertPairs("reserve_time", fmt.Sprint(*f.Parser.ReserveTime)) } if f.Parser.ReserveData != nil { - parent.InsertPairs("reserve_data", fmt.Sprint(f.Parser.ReserveData)) + parent.InsertPairs("reserve_data", fmt.Sprint(*f.Parser.ReserveData)) } if f.Parser.RemoveKeyNameField != nil { - parent.InsertPairs("remove_key_name_field", fmt.Sprint(f.Parser.RemoveKeyNameField)) + parent.InsertPairs("remove_key_name_field", fmt.Sprint(*f.Parser.RemoveKeyNameField)) } if f.Parser.ReplaceInvalidSequence != nil { - parent.InsertPairs("replace_invalid_sequence", fmt.Sprint(f.Parser.ReplaceInvalidSequence)) + parent.InsertPairs("replace_invalid_sequence", fmt.Sprint(*f.Parser.ReplaceInvalidSequence)) } if f.Parser.InjectKeyPrefix != nil { - parent.InsertPairs("inject_key_prefix", fmt.Sprint(f.Parser.InjectKeyPrefix)) + parent.InsertPairs("inject_key_prefix", fmt.Sprint(*f.Parser.InjectKeyPrefix)) } if f.Parser.HashValueField != nil { - parent.InsertPairs("hash_value_field", fmt.Sprint(f.Parser.HashValueField)) + parent.InsertPairs("hash_value_field", fmt.Sprint(*f.Parser.HashValueField)) } if f.Parser.EmitInvalidRecordToError != nil { - parent.InsertPairs("emit_invalid_record_to_error", fmt.Sprint(f.Parser.EmitInvalidRecordToError)) + parent.InsertPairs("emit_invalid_record_to_error", fmt.Sprint(*f.Parser.EmitInvalidRecordToError)) } if child != nil { From 25105d361a645e74becb84c062b8a6608d734b35 Mon Sep 17 00:00:00 2001 From: adiforluls Date: Mon, 22 May 2023 12:35:41 +0530 Subject: [PATCH 32/78] fluentbit namespace-logging: only generate rewrite tag config once for a namespace Signed-off-by: adiforluls --- controllers/fluentbitconfig_controller.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/controllers/fluentbitconfig_controller.go b/controllers/fluentbitconfig_controller.go index f47121e7d..7ae78cb04 100644 --- a/controllers/fluentbitconfig_controller.go +++ b/controllers/fluentbitconfig_controller.go @@ -48,6 +48,8 @@ type FluentBitConfigReconciler struct { Scheme *runtime.Scheme } +var storeNamespaces map[string]bool + // +kubebuilder:rbac:groups=fluentbit.fluent.io,resources=clusterfluentbitconfigs,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=fluentbit.fluent.io,resources=fluentbitconfigs,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=fluentbit.fluent.io,resources=clusterinputs;clusterfilters;clusteroutputs;clusterparsers,verbs=list @@ -66,6 +68,10 @@ type FluentBitConfigReconciler struct { func (r *FluentBitConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { _ = r.Log.WithValues("fluentbitconfig", req.NamespacedName) + // Re-initialize during each reconcile loop to clear namespace names + // we will repopulate namespaces that have a FluentBitConfig CR + storeNamespaces = make(map[string]bool) + var fbs fluentbitv1alpha2.FluentBitList if err := r.List(ctx, &fbs); err != nil { if errors.IsNotFound(err) { @@ -222,9 +228,12 @@ func (r *FluentBitConfigReconciler) processNamespacedFluentBitCfgs(ctx context.C parsers = append(parsers, parserList) clusterParsers = append(clusterParsers, clusterParserList) - rewriteTagConfig := r.generateRewriteTagConfig(cfg, inputs) - if rewriteTagConfig != "" { - rewriteTagConfigs = append(rewriteTagConfigs, rewriteTagConfig) + if _, ok := storeNamespaces[cfg.Namespace]; !ok { + rewriteTagConfig := r.generateRewriteTagConfig(cfg, inputs) + if rewriteTagConfig != "" { + rewriteTagConfigs = append(rewriteTagConfigs, rewriteTagConfig) + storeNamespaces[cfg.Namespace] = true + } } } From 2a36469b6fb306e1520a18770f19f9579b0d51e2 Mon Sep 17 00:00:00 2001 From: Jedrzej Kotkowski Date: Mon, 22 May 2023 22:27:27 +0200 Subject: [PATCH 33/78] add fluentd in_tail plugin Signed-off-by: Jedrzej Kotkowski --- apis/fluentd/v1alpha1/helper.go | 8 +- apis/fluentd/v1alpha1/plugins/filter/types.go | 2 +- apis/fluentd/v1alpha1/plugins/input/tail.go | 138 +++++++++ apis/fluentd/v1alpha1/plugins/input/types.go | 123 ++++++++ apis/fluentd/v1alpha1/plugins/output/types.go | 2 +- apis/fluentd/v1alpha1/plugins/params/const.go | 1 + apis/fluentd/v1alpha1/plugins/params/model.go | 3 +- .../fluentd-global-cfg-input-tail.cfg | 51 ++++ apis/fluentd/v1alpha1/tests/helper_test.go | 23 ++ apis/fluentd/v1alpha1/tests/tools.go | 68 +++++ .../fluentd.fluent.io_clusterfilters.yaml | 3 + .../fluentd.fluent.io_clusteroutputs.yaml | 3 + .../crds/fluentd.fluent.io_filters.yaml | 3 + .../crds/fluentd.fluent.io_fluentds.yaml | 260 +++++++++++++++++ .../crds/fluentd.fluent.io_outputs.yaml | 3 + .../fluentd.fluent.io_clusterfilters.yaml | 3 + .../fluentd.fluent.io_clusteroutputs.yaml | 3 + .../crd/bases/fluentd.fluent.io_filters.yaml | 3 + .../crd/bases/fluentd.fluent.io_fluentds.yaml | 260 +++++++++++++++++ .../crd/bases/fluentd.fluent.io_outputs.yaml | 3 + docs/plugins/fluentd/filter/types.md | 1 + docs/plugins/fluentd/input/tail.md | 52 ++++ docs/plugins/fluentd/input/types.md | 1 + docs/plugins/fluentd/output/types.md | 1 + go.mod | 4 + go.sum | 11 + manifests/setup/fluent-operator-crd.yaml | 272 ++++++++++++++++++ manifests/setup/setup.yaml | 272 ++++++++++++++++++ 28 files changed, 1572 insertions(+), 5 deletions(-) create mode 100644 apis/fluentd/v1alpha1/plugins/input/tail.go create mode 100644 apis/fluentd/v1alpha1/tests/expected/fluentd-global-cfg-input-tail.cfg create mode 100644 docs/plugins/fluentd/input/tail.md diff --git a/apis/fluentd/v1alpha1/helper.go b/apis/fluentd/v1alpha1/helper.go index d44af7f2a..4a5ad0e29 100644 --- a/apis/fluentd/v1alpha1/helper.go +++ b/apis/fluentd/v1alpha1/helper.go @@ -168,7 +168,9 @@ func (r *CfgResources) filterForFilters(cfgId, namespace, name, crdtype string, for n, filter := range filters { filterId := fmt.Sprintf("%s::%s::%s::%s-%d", cfgId, namespace, crdtype, name, n) filter.FilterCommon.Id = &filterId - filter.FilterCommon.Tag = ¶ms.DefaultTag + if filter.FilterCommon.Tag == nil { + filter.FilterCommon.Tag = ¶ms.DefaultTag + } ps, err := filter.Params(sl) if err != nil { @@ -192,7 +194,9 @@ func (r *CfgResources) filterForOutputs(cfgId, namespace, name, crdtype string, for n, output := range outputs { outputId := fmt.Sprintf("%s::%s::%s::%s-%d", cfgId, namespace, crdtype, name, n) output.OutputCommon.Id = &outputId - output.OutputCommon.Tag = ¶ms.DefaultTag + if output.OutputCommon.Tag == nil { + output.OutputCommon.Tag = ¶ms.DefaultTag + } ps, err := output.Params(sl) if err != nil { diff --git a/apis/fluentd/v1alpha1/plugins/filter/types.go b/apis/fluentd/v1alpha1/plugins/filter/types.go index 662cda31f..60547ff89 100644 --- a/apis/fluentd/v1alpha1/plugins/filter/types.go +++ b/apis/fluentd/v1alpha1/plugins/filter/types.go @@ -16,7 +16,7 @@ type FilterCommon struct { // The @log_level parameter specifies the plugin-specific logging level LogLevel *string `json:"logLevel,omitempty"` // Which tag to be matched. - Tag *string `json:"-"` + Tag *string `json:"tag,omitempty"` } // Filter defines all available filter plugins and their parameters. diff --git a/apis/fluentd/v1alpha1/plugins/input/tail.go b/apis/fluentd/v1alpha1/plugins/input/tail.go new file mode 100644 index 000000000..d3e4bd31b --- /dev/null +++ b/apis/fluentd/v1alpha1/plugins/input/tail.go @@ -0,0 +1,138 @@ +package input + +import ( + "encoding/json" + "fmt" + + "github.com/fluent/fluent-operator/v2/apis/fluentd/v1alpha1/plugins" + "github.com/fluent/fluent-operator/v2/apis/fluentd/v1alpha1/plugins/common" + "github.com/fluent/fluent-operator/v2/apis/fluentd/v1alpha1/plugins/params" +) +// The in_tail Input plugin allows Fluentd to read events from the tail of text files. Its behavior is similar to the tail -F command. +type Tail struct { + // +kubebuilder:validation:Required + // The tag of the event. + Tag string `json:"tag"` + // +kubebuilder:validation:Required + // The path(s) to read. Multiple paths can be specified, separated by comma ','. + Path string `json:"path"` + // This parameter is for strftime formatted path like /path/to/%Y/%m/%d/. + PathTimezone string `json:"pathTimezone,omitempty"` + // The paths excluded from the watcher list. + ExcludePath []string `json:"excludePath,omitempty"` + // Avoid to read rotated files duplicately. You should set true when you use * or strftime format in path. + FollowInodes *bool `json:"followInodes,omitempty"` + // The interval to refresh the list of watch files. This is used when the path includes *. + RefreshInterval *uint32 `json:"refreshInterval,omitempty"` + // Limits the watching files that the modification time is within the specified time range when using * in path. + LimitRecentlyModified *uint32 `json:"limitRecentlyModified,omitempty"` + // Skips the refresh of the watch list on startup. This reduces the startup time when * is used in path. + SkipRefreshOnStartup *bool `json:"skipRefreshOnStartup,omitempty"` + // Starts to read the logs from the head of the file or the last read position recorded in pos_file, not tail. + ReadFromHead *bool `json:"readFromHead,omitempty"` + // Specifies the encoding of reading lines. By default, in_tail emits string value as ASCII-8BIT encoding. + // If encoding is specified, in_tail changes string to encoding. + // If encoding and fromEncoding both are specified, in_tail tries to encode string from fromEncoding to encoding. + Encoding string `json:"encoding,omitempty"` + // Specifies the encoding of reading lines. By default, in_tail emits string value as ASCII-8BIT encoding. + // If encoding is specified, in_tail changes string to encoding. + // If encoding and fromEncoding both are specified, in_tail tries to encode string from fromEncoding to encoding. + FromEncoding string `json:"fromEncoding,omitempty"` + // The number of lines to read with each I/O operation. + ReadLinesLimit *int32 `json:"readLinesLimit,omitempty"` + // The number of reading bytes per second to read with I/O operation. This value should be equal or greater than 8192. + ReadBytesLimitPerSecond *int32 `json:"readBytesLimitPerSecond,omitempty"` + // The maximum length of a line. Longer lines than it will be just skipped. + MaxLineSize *int32 `json:"maxLineSize,omitempty"` + // The interval of flushing the buffer for multiline format. + MultilineFlushInterval *uint32 `json:"multilineFlushInterval,omitempty"` + // (recommended) Fluentd will record the position it last read from this file. + // pos_file handles multiple positions in one file so no need to have multiple pos_file parameters per source. + // Don't share pos_file between in_tail configurations. It causes unexpected behavior e.g. corrupt pos_file content. + PosFile string `json:"posFile,omitempty"` + // The interval of doing compaction of pos file. + PosFileCompactionInterval *uint32 `json:"posFileCompactionInterval,omitempty"` + // +kubebuilder:validation:Required + Parse *common.Parse `json:"parse"` + // Adds the watching file path to the path_key field. + PathKey string `json:"pathKey,omitempty"` + // in_tail actually does a bit more than tail -F itself. When rotating a file, some data may still need to be written to the old file as opposed to the new one. + // in_tail takes care of this by keeping a reference to the old file (even after it has been rotated) for some time before transitioning completely to the new file. + // This helps prevent data designated for the old file from getting lost. By default, this time interval is 5 seconds. + // The rotate_wait parameter accepts a single integer representing the number of seconds you want this time interval to be. + RotateWait *uint32 `json:"rotateWait,omitempty"` + // Enables the additional watch timer. Setting this parameter to false will significantly reduce CPU and I/O consumption when tailing a large number of files on systems with inotify support. + // The default is true which results in an additional 1 second timer being used. + EnableWatchTimer *bool `json:"enableWatchTimer,omitempty"` + // Enables the additional inotify-based watcher. Setting this parameter to false will disable the inotify events and use only timer watcher for file tailing. + // This option is mainly for avoiding the stuck issue with inotify. + EnableStatWatcher *bool `json:"enableStatWatcher,omitempty"` + // Opens and closes the file on every update instead of leaving it open until it gets rotated. + OpenOnEveryUpdate *bool `json:"openOnEveryUpdate,omitempty"` + // Emits unmatched lines when format is not matched for incoming logs. + EmitUnmatchedLines *bool `json:"emitUnmatchedLines,omitempty"` + // If you have to exclude the non-permission files from the watch list, set this parameter to true. It suppresses the repeated permission error logs. + IgnoreRepatedPermissionError *bool `json:"ignoreRepeatedPermissionError,omitempty"` + // The in_tail plugin can assign each log file to a group, based on user defined rules. + // The limit parameter controls the total number of lines collected for a group within a rate_period time interval. + Group *Group `json:"group,omitempty"` +} + +type Group struct { + // Specifies the regular expression for extracting metadata (namespace, podname) from log file path. + // Default value of the pattern regexp extracts information about namespace, podname, docker_id, container of the log (K8s specific). + Pattern string `json:"pattern,omitempty"` + // Time period in which the group line limit is applied. in_tail resets the counter after every rate_period interval. + RatePeriod *int32 `json:"ratePeriod,omitempty"` + // Grouping rules for log files. + // +kubebuilder:validation:Required + Rule *Rule `json:"rule"` +} + +type Rule struct { + // match parameter is used to check if a file belongs to a particular group based on hash keys (named captures from pattern) and hash values (regexp in string) + Match map[string]string `json:"match,omitempty"` + // Maximum number of lines allowed from a group in rate_period time interval. The default value of -1 doesn't throttle log files of that group. + Limit *int32 `json:"limit,omitempty"` +} + +func (g *Group) Name() string { + return "group" +} + +func (g *Group) Params(loader plugins.SecretLoader) (*params.PluginStore, error) { + ps := params.NewPluginStore(g.Name()) + + if g.Pattern != "" { + ps.InsertPairs("pattern", fmt.Sprint(g.Pattern)) + } + + if g.RatePeriod != nil { + ps.InsertPairs("rate_period", fmt.Sprint(*g.RatePeriod)) + } + + if g.Rule != nil { + subchild, _ := g.Rule.Params(loader) + ps.InsertChilds(subchild) + } + return ps, nil +} + +func (r *Rule) Name() string { + return "rule" +} + +func (r *Rule) Params(_ plugins.SecretLoader) (*params.PluginStore, error) { + ps := params.NewPluginStore(r.Name()) + + if len(r.Match) > 0 { + matches, _ := json.Marshal(r.Match) + ps.InsertPairs("match", fmt.Sprint(string(matches))) + } + + if r.Limit != nil { + ps.InsertPairs("limit", fmt.Sprint(*r.Limit)) + } + + return ps, nil +} diff --git a/apis/fluentd/v1alpha1/plugins/input/types.go b/apis/fluentd/v1alpha1/plugins/input/types.go index 826a24a8d..f250b1cb2 100644 --- a/apis/fluentd/v1alpha1/plugins/input/types.go +++ b/apis/fluentd/v1alpha1/plugins/input/types.go @@ -4,6 +4,7 @@ import ( "encoding/json" "errors" "fmt" + "strings" "github.com/fluent/fluent-operator/v2/apis/fluentd/v1alpha1/plugins" "github.com/fluent/fluent-operator/v2/apis/fluentd/v1alpha1/plugins/params" @@ -26,6 +27,8 @@ type Input struct { Forward *Forward `json:"forward,omitempty"` // in_http plugin Http *Http `json:"http,omitempty"` + // in_tail plugin + Tail *Tail `json:"tail,omitempty"` } // DeepCopyInto implements the DeepCopyInto interface. @@ -70,9 +73,129 @@ func (i *Input) Params(loader plugins.SecretLoader) (*params.PluginStore, error) return i.httpPlugin(ps, loader), nil } + if i.Tail != nil { + ps.InsertType(string(params.TailInputType)) + return i.tailPlugin(ps, loader), nil + } + return nil, errors.New("you must define an input plugin") } +func (i *Input) tailPlugin(parent *params.PluginStore, loader plugins.SecretLoader) *params.PluginStore { + tailModel := i.Tail + childs := make([]*params.PluginStore, 0) + + if tailModel.Parse != nil { + child, _ := tailModel.Parse.Params(loader) + childs = append(childs, child) + } + + if tailModel.Group != nil { + child, _ := tailModel.Group.Params(loader) + childs = append(childs, child) + } + // TODO: add group section! + parent.InsertChilds(childs...) + + if tailModel.Tag != "" { + parent.InsertPairs("tag", fmt.Sprint(tailModel.Tag)) + } + + if tailModel.Path != "" { + parent.InsertPairs("path", fmt.Sprint(tailModel.Path)) + } + + if tailModel.PathTimezone != "" { + parent.InsertPairs("path_timezone", fmt.Sprint(tailModel.PathTimezone)) + } + + if tailModel.ExcludePath != nil { + parent.InsertPairs("exclude_path", strings.ReplaceAll(fmt.Sprintf("%+q", tailModel.ExcludePath), "\" \"", "\", \"")) + } + + if tailModel.FollowInodes != nil { + parent.InsertPairs("follow_inodes", fmt.Sprint(*tailModel.FollowInodes)) + } + + if tailModel.RefreshInterval != nil { + parent.InsertPairs("refresh_interval", fmt.Sprint(*tailModel.RefreshInterval)) + } + + if tailModel.LimitRecentlyModified != nil { + parent.InsertPairs("limit_recently_modified", fmt.Sprint(*tailModel.LimitRecentlyModified)) + } + + if tailModel.SkipRefreshOnStartup != nil { + parent.InsertPairs("skip_refresh_on_startup", fmt.Sprint(*tailModel.SkipRefreshOnStartup)) + } + + if tailModel.ReadFromHead != nil { + parent.InsertPairs("read_from_head", fmt.Sprint(*tailModel.ReadFromHead)) + } + + if tailModel.Encoding != "" { + parent.InsertPairs("encoding", fmt.Sprint(tailModel.Encoding)) + } + + if tailModel.FromEncoding != "" { + parent.InsertPairs("from_encoding", fmt.Sprint(tailModel.FromEncoding)) + } + + if tailModel.ReadLinesLimit != nil { + parent.InsertPairs("read_lines_limit", fmt.Sprint(*tailModel.ReadLinesLimit)) + } + + if tailModel.ReadBytesLimitPerSecond != nil { + parent.InsertPairs("read_bytes_limit_per_second", fmt.Sprint(*tailModel.ReadBytesLimitPerSecond)) + } + + if tailModel.MaxLineSize != nil { + parent.InsertPairs("max_line_size", fmt.Sprint(*tailModel.MaxLineSize)) + } + + if tailModel.MultilineFlushInterval != nil { + parent.InsertPairs("multiline_flush_interval", fmt.Sprint(*tailModel.MultilineFlushInterval)) + } + + if tailModel.PosFile != "" { + parent.InsertPairs("pos_file", fmt.Sprint(tailModel.PosFile)) + } + + if tailModel.PosFileCompactionInterval != nil { + parent.InsertPairs("pos_file_compaction_interval", fmt.Sprint(*tailModel.PosFileCompactionInterval)) + } + + if tailModel.PathKey != "" { + parent.InsertPairs("path_key", fmt.Sprint(tailModel.PathKey)) + } + + if tailModel.RotateWait != nil { + parent.InsertPairs("rotate_wait", fmt.Sprint(*tailModel.RotateWait)) + } + + if tailModel.EnableWatchTimer != nil { + parent.InsertPairs("enable_watch_timer", fmt.Sprint(*tailModel.EnableWatchTimer)) + } + + if tailModel.EnableStatWatcher != nil { + parent.InsertPairs("enable_stat_watcher", fmt.Sprint(*tailModel.EnableStatWatcher)) + } + + if tailModel.OpenOnEveryUpdate != nil { + parent.InsertPairs("open_on_every_update", fmt.Sprint(*tailModel.OpenOnEveryUpdate)) + } + + if tailModel.EmitUnmatchedLines != nil { + parent.InsertPairs("emit_unmatched_lines", fmt.Sprint(*tailModel.EmitUnmatchedLines)) + } + + if tailModel.IgnoreRepatedPermissionError != nil { + parent.InsertPairs("ignore_repeated_permission_error", fmt.Sprint(*tailModel.IgnoreRepatedPermissionError)) + } + + return parent +} + func (i *Input) forwardPlugin(parent *params.PluginStore, loader plugins.SecretLoader) *params.PluginStore { forwardModel := i.Forward childs := make([]*params.PluginStore, 0) diff --git a/apis/fluentd/v1alpha1/plugins/output/types.go b/apis/fluentd/v1alpha1/plugins/output/types.go index 486661ef4..a74239b41 100644 --- a/apis/fluentd/v1alpha1/plugins/output/types.go +++ b/apis/fluentd/v1alpha1/plugins/output/types.go @@ -21,7 +21,7 @@ type OutputCommon struct { // The @label parameter is to route the events to @@ -172,8 +172,8 @@ @id common_buffer @type file - chunk_limit_size 5GB path /buffers/fd.log + total_limit_size 5GB host host @@ -191,8 +191,8 @@ @id common_buffer @type file - chunk_limit_size 5GB path /buffers/fd.log + total_limit_size 5GB @type json @@ -209,8 +209,8 @@ @id common_buffer @type file - chunk_limit_size 5GB path /buffers/fd.log + total_limit_size 5GB \ No newline at end of file From abbb7eff0e771cc0c524e601e87683ccbbd8ea6a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 9 Jul 2023 10:58:20 +0800 Subject: [PATCH 70/78] build(deps): Bump github.com/go-openapi/errors from 0.20.3 to 0.20.4 (#795) Bumps [github.com/go-openapi/errors](https://github.com/go-openapi/errors) from 0.20.3 to 0.20.4. - [Commits](https://github.com/go-openapi/errors/compare/v0.20.3...v0.20.4) --- updated-dependencies: - dependency-name: github.com/go-openapi/errors dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b8ff43e8b..49e7cc142 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/go-kit/kit v0.12.0 github.com/go-kit/log v0.2.1 github.com/go-logr/logr v1.2.4 - github.com/go-openapi/errors v0.20.3 + github.com/go-openapi/errors v0.20.4 github.com/joho/godotenv v1.5.1 github.com/oklog/run v1.1.0 github.com/onsi/ginkgo v1.16.5 diff --git a/go.sum b/go.sum index 5268da82a..74a4d0108 100644 --- a/go.sum +++ b/go.sum @@ -96,8 +96,8 @@ github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= -github.com/go-openapi/errors v0.20.3 h1:rz6kiC84sqNQoqrtulzaL/VERgkoCyB6WdEkc2ujzUc= -github.com/go-openapi/errors v0.20.3/go.mod h1:Z3FlZ4I8jEGxjUK+bugx3on2mIAk4txuAOhlsB1FSgk= +github.com/go-openapi/errors v0.20.4 h1:unTcVm6PispJsMECE3zWgvG4xTiKda1LIR5rCRWLG6M= +github.com/go-openapi/errors v0.20.4/go.mod h1:Z3FlZ4I8jEGxjUK+bugx3on2mIAk4txuAOhlsB1FSgk= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.20.1 h1:FBLnyygC4/IZZr893oiomc9XaghoveYTrLC1F86HID8= From cdd17b8cc06bb619f7f24347ae7026d95e17b5b7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 9 Jul 2023 10:59:01 +0800 Subject: [PATCH 71/78] build(deps): Bump github.com/onsi/gomega from 1.27.7 to 1.27.8 (#794) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.27.7 to 1.27.8. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.27.7...v1.27.8) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 49e7cc142..a8b213f0e 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/joho/godotenv v1.5.1 github.com/oklog/run v1.1.0 github.com/onsi/ginkgo v1.16.5 - github.com/onsi/gomega v1.27.7 + github.com/onsi/gomega v1.27.8 k8s.io/api v0.26.3 k8s.io/apimachinery v0.27.2 k8s.io/client-go v0.26.3 diff --git a/go.sum b/go.sum index 74a4d0108..bc5b31c72 100644 --- a/go.sum +++ b/go.sum @@ -234,11 +234,11 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.9.5 h1:+6Hr4uxzP4XIUyAkg61dWBw8lb/gc4/X5luuxN/EC+Q= +github.com/onsi/ginkgo/v2 v2.9.7 h1:06xGQy5www2oN160RtEZoTvnP2sPhEfePYmCDc2szss= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.27.7 h1:fVih9JD6ogIiHUN6ePK7HJidyEDpWGVB5mzM7cWNXoU= -github.com/onsi/gomega v1.27.7/go.mod h1:1p8OOlwo2iUUDsHnOrjE5UKYJ+e3W8eQ3qSlRahPmr4= +github.com/onsi/gomega v1.27.8 h1:gegWiwZjBsf2DgiSbf5hpokZ98JVDMcWkUiigk6/KXc= +github.com/onsi/gomega v1.27.8/go.mod h1:2J8vzI/s+2shY9XHRApDkdgPo1TKT7P2u6fXeJKFnNQ= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= From 9b917a7df496a8b80ef91be3d756fe90941d0e9f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 9 Jul 2023 11:01:14 +0800 Subject: [PATCH 72/78] build(deps): Bump golang in /cmd/fluent-manager (#783) Bumps golang from 1.20.4-alpine3.17 to 1.20.5-alpine3.17. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/fluent-manager/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/fluent-manager/Dockerfile b/cmd/fluent-manager/Dockerfile index 6a8ff6561..50a702a14 100644 --- a/cmd/fluent-manager/Dockerfile +++ b/cmd/fluent-manager/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM --platform=$BUILDPLATFORM golang:1.20.4-alpine3.17 as builder +FROM --platform=$BUILDPLATFORM golang:1.20.5-alpine3.17 as builder WORKDIR /workspace # Copy the Go Modules manifests From 88ab30b4b9fd488f70b6d59506707a10babc4a72 Mon Sep 17 00:00:00 2001 From: karan k Date: Fri, 7 Jul 2023 15:54:27 +0530 Subject: [PATCH 73/78] Support system layer in service section of fluenbit Signed-off-by: karan k --- .../v1alpha2/clusterfluentbitconfig_types.go | 46 ++++ .../v1alpha2/plugins/input/systemd_types.go | 12 ++ .../v1alpha2/plugins/input/tail_types.go | 12 ++ .../plugins/output/open_search_types.go | 5 + ...bit.fluent.io_clusterfluentbitconfigs.yaml | 52 +++++ .../fluentbit.fluent.io_clusterinputs.yaml | 30 +++ .../fluentbit.fluent.io_clusteroutputs.yaml | 60 +++--- .../crds/fluentbit.fluent.io_outputs.yaml | 60 +++--- .../crds/fluentd.fluent.io_fluentds.yaml | 2 +- .../fluentbit-clusterinput-systemd.yaml | 4 + .../fluentbit-clusterinput-tail.yaml | 4 + .../fluentbitconfig-fluentBitConfig.yaml | 4 + charts/fluent-operator/values.yaml | 26 +++ ...bit.fluent.io_clusterfluentbitconfigs.yaml | 52 +++++ .../fluentbit.fluent.io_clusterinputs.yaml | 30 +++ .../fluentbit.fluent.io_clusteroutputs.yaml | 60 +++--- .../bases/fluentbit.fluent.io_outputs.yaml | 60 +++--- .../crd/bases/fluentd.fluent.io_fluentds.yaml | 2 +- manifests/setup/fluent-operator-crd.yaml | 204 +++++++++++++----- manifests/setup/setup.yaml | 204 +++++++++++++----- 20 files changed, 701 insertions(+), 228 deletions(-) diff --git a/apis/fluentbit/v1alpha2/clusterfluentbitconfig_types.go b/apis/fluentbit/v1alpha2/clusterfluentbitconfig_types.go index 2740cd9ea..7cb30d32e 100644 --- a/apis/fluentbit/v1alpha2/clusterfluentbitconfig_types.go +++ b/apis/fluentbit/v1alpha2/clusterfluentbitconfig_types.go @@ -46,6 +46,27 @@ type FluentBitConfigSpec struct { Namespace *string `json:"namespace,omitempty"` } +type Storage struct { + // Select an optional location in the file system to store streams and chunks of data/ + Path string `json:"path,omitempty"` + // Configure the synchronization mode used to store the data into the file system + // +kubebuilder:validation:Enum:=normal;full + Sync string `json:"sync,omitempty"` + // Enable the data integrity check when writing and reading data from the filesystem + // +kubebuilder:validation:Enum:=on;off + Checksum string `json:"checksum,omitempty"` + // This option configure a hint of maximum value of memory to use when processing these records + BacklogMemLimit string `json:"backlogMemLimit,omitempty"` + // If the input plugin has enabled filesystem storage type, this property sets the maximum number of Chunks that can be up in memory + MaxChunksUp *int64 `json:"maxChunksUp,omitempty"` + // If http_server option has been enabled in the Service section, this option registers a new endpoint where internal metrics of the storage layer can be consumed + // +kubebuilder:validation:Enum:=on;off + Metrics string `json:"metrics,omitempty"` + // When enabled, irrecoverable chunks will be deleted during runtime, and any other irrecoverable chunk located in the configured storage path directory will be deleted when Fluent-Bit starts. + // +kubebuilder:validation:Enum:=on;off + DeleteIrrecoverableChunks string `json:"deleteIrrecoverableChunks,omitempty"` +} + type Service struct { // If true go to background on start Daemon *bool `json:"daemon,omitempty"` @@ -80,6 +101,8 @@ type Service struct { LogLevel string `json:"logLevel,omitempty"` // Optional 'parsers' config file (can be multiple) ParsersFile string `json:"parsersFile,omitempty"` + // Configure a global environment for the storage layer in Service. It is recommended to configure the volume and volumeMount separately for this storage. The hostPath type should be used for that Volume in Fluentbit daemon set. + Storage *Storage `json:"storage,omitempty"` } // +kubebuilder:object:root=true @@ -149,6 +172,29 @@ func (s *Service) Params() *params.KVs { if s.ParsersFile != "" { m.Insert("Parsers_File", s.ParsersFile) } + if s.Storage != nil { + if s.Storage.Path != "" { + m.Insert("storage.path", s.Storage.Path) + } + if s.Storage.Sync != "" { + m.Insert("storage.sync", s.Storage.Sync) + } + if s.Storage.Checksum != "" { + m.Insert("storage.checksum", s.Storage.Checksum) + } + if s.Storage.BacklogMemLimit != "" { + m.Insert("storage.backlog.mem_limit", s.Storage.BacklogMemLimit) + } + if s.Storage.Metrics != "" { + m.Insert("storage.metrics", s.Storage.Metrics) + } + if s.Storage.MaxChunksUp != nil { + m.Insert("storage.max_chunks_up", fmt.Sprint(*s.Storage.MaxChunksUp)) + } + if s.Storage.DeleteIrrecoverableChunks != "" { + m.Insert("storage.delete_irrecoverable_chunks", s.Storage.DeleteIrrecoverableChunks) + } + } return m } diff --git a/apis/fluentbit/v1alpha2/plugins/input/systemd_types.go b/apis/fluentbit/v1alpha2/plugins/input/systemd_types.go index 5d4ffac6b..5e86575b2 100644 --- a/apis/fluentbit/v1alpha2/plugins/input/systemd_types.go +++ b/apis/fluentbit/v1alpha2/plugins/input/systemd_types.go @@ -44,6 +44,12 @@ type Systemd struct { // Remove the leading underscore of the Journald field (key). For example the Journald field _PID becomes the key PID. // +kubebuilder:validation:Enum:=on;off StripUnderscores string `json:"stripUnderscores,omitempty"` + // Specify the buffering mechanism to use. It can be memory or filesystem + // +kubebuilder:validation:Enum:=filesystem;memory + StorageType string `json:"storageType,omitempty"` + // Specifies if the input plugin should be paused (stop ingesting new data) when the storage.max_chunks_up value is reached. + // +kubebuilder:validation:Enum:=on;off + PauseOnChunksOverlimit string `json:"pauseOnChunksOverlimit,omitempty"` } func (_ *Systemd) Name() string { @@ -85,6 +91,12 @@ func (s *Systemd) Params(_ plugins.SecretLoader) (*params.KVs, error) { if s.StripUnderscores != "" { kvs.Insert("Strip_Underscores", s.StripUnderscores) } + if s.StorageType != "" { + kvs.Insert("storage.type", s.StorageType) + } + if s.PauseOnChunksOverlimit != "" { + kvs.Insert("storage.pause_on_chunks_overlimit", s.PauseOnChunksOverlimit) + } return kvs, nil } diff --git a/apis/fluentbit/v1alpha2/plugins/input/tail_types.go b/apis/fluentbit/v1alpha2/plugins/input/tail_types.go index 149af9546..6ca911470 100644 --- a/apis/fluentbit/v1alpha2/plugins/input/tail_types.go +++ b/apis/fluentbit/v1alpha2/plugins/input/tail_types.go @@ -93,6 +93,12 @@ type Tail struct { // This will help to reassembly multiline messages originally split by Docker or CRI //Specify one or Multiline Parser definition to apply to the content. MultilineParser string `json:"multilineParser,omitempty"` + // Specify the buffering mechanism to use. It can be memory or filesystem + // +kubebuilder:validation:Enum:=filesystem;memory + StorageType string `json:"storageType,omitempty"` + // Specifies if the input plugin should be paused (stop ingesting new data) when the storage.max_chunks_up value is reached. + // +kubebuilder:validation:Enum:=on;off + PauseOnChunksOverlimit string `json:"pauseOnChunksOverlimit,omitempty"` } func (_ *Tail) Name() string { @@ -179,5 +185,11 @@ func (t *Tail) Params(_ plugins.SecretLoader) (*params.KVs, error) { if t.MultilineParser != "" { kvs.Insert("multiline.parser", t.MultilineParser) } + if t.StorageType != "" { + kvs.Insert("storage.type", t.StorageType) + } + if t.PauseOnChunksOverlimit != "" { + kvs.Insert("storage.pause_on_chunks_overlimit", t.PauseOnChunksOverlimit) + } return kvs, nil } diff --git a/apis/fluentbit/v1alpha2/plugins/output/open_search_types.go b/apis/fluentbit/v1alpha2/plugins/output/open_search_types.go index 7bdfa40ce..cbbf98111 100644 --- a/apis/fluentbit/v1alpha2/plugins/output/open_search_types.go +++ b/apis/fluentbit/v1alpha2/plugins/output/open_search_types.go @@ -94,6 +94,8 @@ type OpenSearch struct { // Enables dedicated thread(s) for this output. Default value is set since version 1.8.13. For previous versions is 0. Workers *int32 `json:"Workers,omitempty"` *plugins.TLS `json:"tls,omitempty"` + // Limit the maximum number of Chunks in the filesystem for the current output logical destination. + TotalLimitSize string `json:"totalLimitSize,omitempty"` } // Name implement Section() method @@ -215,5 +217,8 @@ func (o *OpenSearch) Params(sl plugins.SecretLoader) (*params.KVs, error) { } kvs.Merge(tls) } + if o.TotalLimitSize != "" { + kvs.Insert("storage.total_limit_size", o.TotalLimitSize) + } return kvs, nil } diff --git a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterfluentbitconfigs.yaml b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterfluentbitconfigs.yaml index 43c89effe..31d611b98 100644 --- a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterfluentbitconfigs.yaml +++ b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterfluentbitconfigs.yaml @@ -297,6 +297,58 @@ spec: parsersFile: description: Optional 'parsers' config file (can be multiple) type: string + storage: + description: Configure a global environment for the storage layer + in Service. It is recommended to configure the volume and volumeMount + separately for this storage. The hostPath type should be used + for that Volume in Fluentbit daemon set. + properties: + backlogMemLimit: + description: This option configure a hint of maximum value + of memory to use when processing these records + type: string + checksum: + description: Enable the data integrity check when writing + and reading data from the filesystem + enum: + - "on" + - "off" + type: string + deleteIrrecoverableChunks: + description: When enabled, irrecoverable chunks will be deleted + during runtime, and any other irrecoverable chunk located + in the configured storage path directory will be deleted + when Fluent-Bit starts. + enum: + - "on" + - "off" + type: string + maxChunksUp: + description: If the input plugin has enabled filesystem storage + type, this property sets the maximum number of Chunks that + can be up in memory + format: int64 + type: integer + metrics: + description: If http_server option has been enabled in the + Service section, this option registers a new endpoint where + internal metrics of the storage layer can be consumed + enum: + - "on" + - "off" + type: string + path: + description: Select an optional location in the file system + to store streams and chunks of data/ + type: string + sync: + description: Configure the synchronization mode used to store + the data into the file system + enum: + - normal + - full + type: string + type: object type: object type: object type: object diff --git a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterinputs.yaml b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterinputs.yaml index fdf86612b..44a71dbf4 100644 --- a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterinputs.yaml +++ b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterinputs.yaml @@ -176,6 +176,14 @@ spec: not set, the plugin will use default paths to read local-only logs. type: string + pauseOnChunksOverlimit: + description: Specifies if the input plugin should be paused (stop + ingesting new data) when the storage.max_chunks_up value is + reached. + enum: + - "on" + - "off" + type: string readFromTail: description: Start reading new entries. Skip entries already stored in Journald. @@ -183,6 +191,13 @@ spec: - "on" - "off" type: string + storageType: + description: Specify the buffering mechanism to use. It can be + memory or filesystem + enum: + - filesystem + - memory + type: string stripUnderscores: description: Remove the leading underscore of the Journald field (key). For example the Journald field _PID becomes the key PID. @@ -328,6 +343,14 @@ spec: file as part of the record. The value assigned becomes the key in the map. type: string + pauseOnChunksOverlimit: + description: Specifies if the input plugin should be paused (stop + ingesting new data) when the storage.max_chunks_up value is + reached. + enum: + - "on" + - "off" + type: string readFromHead: description: For new discovered files on start (without a database offset/position), read the content from the head of the file, @@ -350,6 +373,13 @@ spec: behavior and instruct Fluent Bit to skip long lines and continue processing other lines that fits into the buffer size. type: boolean + storageType: + description: Specify the buffering mechanism to use. It can be + memory or filesystem + enum: + - filesystem + - memory + type: string tag: description: Set a tag (with regex-extract fields) that will be placed on lines read. E.g. kube... diff --git a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml index ee10b9518..d0e9acc37 100644 --- a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml +++ b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml @@ -1846,6 +1846,10 @@ spec: description: Hostname to be used for TLS SNI extension type: string type: object + totalLimitSize: + description: Limit the maximum number of Chunks in the filesystem + for the current output logical destination. + type: string traceError: description: When enabled print the elasticsearch API calls to stdout when elasticsearch returns an error @@ -2214,116 +2218,116 @@ spec: s3: description: S3 defines S3 Output configuration. properties: - auto_retry_requests: + AutoRetryRequests: description: Immediately retry failed requests to AWS services once. type: boolean - bucket: + Bucket: description: S3 Bucket name type: string - canned_acl: + CannedAcl: description: Predefined Canned ACL Policy for S3 objects. type: string - compression: + Compression: description: Compression type for S3 objects. type: string - content_type: + ContentType: description: A standard MIME type for the S3 object; this will be set as the Content-Type HTTP header. type: string - endpoint: + Endpoint: description: Custom endpoint for the S3 API. type: string - external_id: + ExternalId: description: Specify an external ID for the STS API, can be used with the role_arn parameter if your role requires an external ID. type: string - json_date_format: + JsonDateFormat: description: 'Specify the format of the date. Supported formats are double, epoch, iso8601 (eg: 2018-05-30T09:39:52.000681Z) and java_sql_timestamp (eg: 2018-05-30 09:39:52.000681)' type: string - json_date_key: + JsonDateKey: description: Specify the name of the time key in the output record. To disable the time key just set the value to false. type: string - log_key: + LogKey: description: By default, the whole log record will be sent to S3. If you specify a key name with this option, then only the value of that key will be sent to S3. type: string - preserve_data_ordering: + PreserveDataOrdering: description: Normally, when an upload request fails, there is a high chance for the last received chunk to be swapped with a later chunk, resulting in data shuffling. This feature prevents this shuffling by using a queue logic for uploads. type: boolean - region: + Region: description: The AWS region of your S3 bucket type: string - retry_limit: + RetryLimit: description: Integer value to set the maximum number of retries allowed. format: int32 type: integer - role_arn: + RoleArn: description: ARN of an IAM role to assume type: string - s3_key_format: + S3KeyFormat: description: Format string for keys in S3. type: string - s3_key_format_tag_delimiters: + S3KeyFormatTagDelimiters: description: A series of characters which will be used to split the tag into 'parts' for use with the s3_key_format option. type: string - send_content_md5: + SendContentMd5: description: Send the Content-MD5 header with PutObject and UploadPart requests, as is required when Object Lock is enabled. type: boolean - static_file_path: + StaticFilePath: description: Disables behavior where UUID string is automatically appended to end of S3 key name when $UUID is not provided in s3_key_format. $UUID, time formatters, $TAG, and other dynamic key formatters all work as expected while this feature is set to true. type: boolean - storage_class: + StorageClass: description: Specify the storage class for S3 objects. If this option is not specified, objects will be stored with the default 'STANDARD' storage class. type: string - store_dir: + StoreDir: description: Directory to locally buffer data before sending. type: string - store_dir_limit_size: + StoreDirLimitSize: description: The size of the limitation for disk usage in S3. type: string - sts_endpoint: + StsEndpoint: description: Custom endpoint for the STS API. type: string - total_file_size: + TotalFileSize: description: Specifies the size of files in S3. Minimum size is 1M. With use_put_object On the maximum size is 1G. With multipart upload mode, the maximum size is 50G. type: string - upload_chunk_size: + UploadChunkSize: description: 'The size of each ''part'' for multipart uploads. Max: 50M' type: string - upload_timeout: + UploadTimeout: description: Whenever this amount of time has elapsed, Fluent Bit will complete an upload and create a new file in S3. For example, set this value to 60m and you will get a new file every hour. type: string - use_put_object: + UsePutObject: description: Use the S3 PutObject API, instead of the multipart upload API. type: boolean required: - - bucket - - region + - Bucket + - Region type: object splunk: description: Splunk defines Splunk Output Configuration diff --git a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml index 9b52e800c..e460042bb 100644 --- a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml +++ b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml @@ -1846,6 +1846,10 @@ spec: description: Hostname to be used for TLS SNI extension type: string type: object + totalLimitSize: + description: Limit the maximum number of Chunks in the filesystem + for the current output logical destination. + type: string traceError: description: When enabled print the elasticsearch API calls to stdout when elasticsearch returns an error @@ -2214,116 +2218,116 @@ spec: s3: description: S3 defines S3 Output configuration. properties: - auto_retry_requests: + AutoRetryRequests: description: Immediately retry failed requests to AWS services once. type: boolean - bucket: + Bucket: description: S3 Bucket name type: string - canned_acl: + CannedAcl: description: Predefined Canned ACL Policy for S3 objects. type: string - compression: + Compression: description: Compression type for S3 objects. type: string - content_type: + ContentType: description: A standard MIME type for the S3 object; this will be set as the Content-Type HTTP header. type: string - endpoint: + Endpoint: description: Custom endpoint for the S3 API. type: string - external_id: + ExternalId: description: Specify an external ID for the STS API, can be used with the role_arn parameter if your role requires an external ID. type: string - json_date_format: + JsonDateFormat: description: 'Specify the format of the date. Supported formats are double, epoch, iso8601 (eg: 2018-05-30T09:39:52.000681Z) and java_sql_timestamp (eg: 2018-05-30 09:39:52.000681)' type: string - json_date_key: + JsonDateKey: description: Specify the name of the time key in the output record. To disable the time key just set the value to false. type: string - log_key: + LogKey: description: By default, the whole log record will be sent to S3. If you specify a key name with this option, then only the value of that key will be sent to S3. type: string - preserve_data_ordering: + PreserveDataOrdering: description: Normally, when an upload request fails, there is a high chance for the last received chunk to be swapped with a later chunk, resulting in data shuffling. This feature prevents this shuffling by using a queue logic for uploads. type: boolean - region: + Region: description: The AWS region of your S3 bucket type: string - retry_limit: + RetryLimit: description: Integer value to set the maximum number of retries allowed. format: int32 type: integer - role_arn: + RoleArn: description: ARN of an IAM role to assume type: string - s3_key_format: + S3KeyFormat: description: Format string for keys in S3. type: string - s3_key_format_tag_delimiters: + S3KeyFormatTagDelimiters: description: A series of characters which will be used to split the tag into 'parts' for use with the s3_key_format option. type: string - send_content_md5: + SendContentMd5: description: Send the Content-MD5 header with PutObject and UploadPart requests, as is required when Object Lock is enabled. type: boolean - static_file_path: + StaticFilePath: description: Disables behavior where UUID string is automatically appended to end of S3 key name when $UUID is not provided in s3_key_format. $UUID, time formatters, $TAG, and other dynamic key formatters all work as expected while this feature is set to true. type: boolean - storage_class: + StorageClass: description: Specify the storage class for S3 objects. If this option is not specified, objects will be stored with the default 'STANDARD' storage class. type: string - store_dir: + StoreDir: description: Directory to locally buffer data before sending. type: string - store_dir_limit_size: + StoreDirLimitSize: description: The size of the limitation for disk usage in S3. type: string - sts_endpoint: + StsEndpoint: description: Custom endpoint for the STS API. type: string - total_file_size: + TotalFileSize: description: Specifies the size of files in S3. Minimum size is 1M. With use_put_object On the maximum size is 1G. With multipart upload mode, the maximum size is 50G. type: string - upload_chunk_size: + UploadChunkSize: description: 'The size of each ''part'' for multipart uploads. Max: 50M' type: string - upload_timeout: + UploadTimeout: description: Whenever this amount of time has elapsed, Fluent Bit will complete an upload and create a new file in S3. For example, set this value to 60m and you will get a new file every hour. type: string - use_put_object: + UsePutObject: description: Use the S3 PutObject API, instead of the multipart upload API. type: boolean required: - - bucket - - region + - Bucket + - Region type: object splunk: description: Splunk defines Splunk Output Configuration diff --git a/charts/fluent-operator/charts/fluentd-crds/crds/fluentd.fluent.io_fluentds.yaml b/charts/fluent-operator/charts/fluentd-crds/crds/fluentd.fluent.io_fluentds.yaml index 952415f70..91728355e 100644 --- a/charts/fluent-operator/charts/fluentd-crds/crds/fluentd.fluent.io_fluentds.yaml +++ b/charts/fluent-operator/charts/fluentd-crds/crds/fluentd.fluent.io_fluentds.yaml @@ -1310,7 +1310,7 @@ spec: x-kubernetes-map-type: atomic defaultOutputSelector: description: Select cluster output plugins used to send all logs that - did not match a route to the matching outputs + did not match any route to the matching outputs properties: matchExpressions: description: matchExpressions is a list of label selector requirements. diff --git a/charts/fluent-operator/templates/fluentbit-clusterinput-systemd.yaml b/charts/fluent-operator/templates/fluentbit-clusterinput-systemd.yaml index 6e27b641e..5ed37d645 100644 --- a/charts/fluent-operator/templates/fluentbit-clusterinput-systemd.yaml +++ b/charts/fluent-operator/templates/fluentbit-clusterinput-systemd.yaml @@ -25,6 +25,10 @@ spec: {{- toYaml .Values.fluentbit.input.systemd.systemdFilter.filters | nindent 6 }} {{- end }} {{- end }} + storageType: {{ .Values.fluentbit.input.systemd.storageType }} + {{- if eq .Values.fluentbit.input.systemd.storageType "filesystem" }} + pauseOnChunksOverlimit: {{ .Values.fluentbit.input.systemd.pauseOnChunksOverlimit | quote }} + {{- end }} {{- end }} {{- end }} {{- end }} diff --git a/charts/fluent-operator/templates/fluentbit-clusterinput-tail.yaml b/charts/fluent-operator/templates/fluentbit-clusterinput-tail.yaml index d2c36e323..76fd07387 100644 --- a/charts/fluent-operator/templates/fluentbit-clusterinput-tail.yaml +++ b/charts/fluent-operator/templates/fluentbit-clusterinput-tail.yaml @@ -25,6 +25,10 @@ spec: skipLongLines: {{ .Values.fluentbit.input.tail.skipLongLines }} db: /fluent-bit/tail/pos.db dbSync: Normal + storageType: {{ .Values.fluentbit.input.tail.storageType }} + {{- if eq .Values.fluentbit.input.tail.storageType "filesystem" }} + pauseOnChunksOverlimit: {{ .Values.fluentbit.input.tail.pauseOnChunksOverlimit | quote }} + {{- end }} {{- end }} {{- end }} {{- end }} diff --git a/charts/fluent-operator/templates/fluentbitconfig-fluentBitConfig.yaml b/charts/fluent-operator/templates/fluentbitconfig-fluentBitConfig.yaml index c7abf3faf..f5d44908c 100644 --- a/charts/fluent-operator/templates/fluentbitconfig-fluentBitConfig.yaml +++ b/charts/fluent-operator/templates/fluentbitconfig-fluentBitConfig.yaml @@ -9,6 +9,10 @@ metadata: spec: service: parsersFile: parsers.conf +{{- if .Values.fluentbit.service.storage }} + storage: +{{ toYaml .Values.fluentbit.service.storage | indent 6 }} +{{- end }} inputSelector: matchLabels: fluentbit.fluent.io/enabled: "true" diff --git a/charts/fluent-operator/values.yaml b/charts/fluent-operator/values.yaml index c3bfe88f8..fad472c21 100644 --- a/charts/fluent-operator/values.yaml +++ b/charts/fluent-operator/values.yaml @@ -134,6 +134,10 @@ fluentbit: # - name: hostSys # hostPath: # path: /sys/ + # Uncomment the code if you intend to create the volume for buffer storage in case the storage type "filesystem" is being used in the configuration of the fluentbit service. + # - name: hostBuffer + # hostPath: + # path: /tmp/fluent-bit-buffer # additionalVolumesMounts: # - mountPath: /host/sys # mountPropagation: HostToContainer @@ -143,6 +147,11 @@ fluentbit: # mountPropagation: HostToContainer # name: hostProc # readOnly: true + # Uncomment the code if you intend to mount the volume for buffer storage in case the storage type "filesystem" is being used in the configuration of the fluentbit service. + # - mountPath: /host/fluent-bit-buffer + # mountPropagation: HostToContainer + # name: hostBuffer + namespaceFluentBitCfgSelector: {} @@ -160,6 +169,9 @@ fluentbit: path: "/var/log/containers/*.log" skipLongLines: true readFromHead: false + # Use storageType as "filesystem" if you want to use filesystem as the buffering mechanism for tail input. + storageType: memory + pauseOnChunksOverlimit: "off" systemd: enable: true systemdFilter: @@ -168,6 +180,9 @@ fluentbit: path: "/var/log/journal" includeKubelet: true stripUnderscores: "off" + # Use storageType as "filesystem" if you want to use filesystem as the buffering mechanism for systemd input. + storageType: memory + pauseOnChunksOverlimit: "off" nodeExporterMetrics: {} # uncomment below nodeExporterMetrics section if you want to collect node exporter metrics # nodeExporterMetrics: @@ -213,6 +228,17 @@ fluentbit: # You can configure the opensearch-related configuration here stdout: enable: false + service: + storage: {} +# Remove the above storage section and uncomment below section if you want to configure file-system as storage for buffer +# storage: +# path: "/host/fluent-bit-buffer/" +# backlogMemLimit: "50MB" +# checksum: "off" +# deleteIrrecoverableChunks: "on" +# maxChunksUp: 128 +# metrics: "on" +# sync: normal # Configure the default filters in FluentBit. # The `filter` will filter and parse the collected log information and output the logs into a uniform format. You can choose whether to turn this on or not. diff --git a/config/crd/bases/fluentbit.fluent.io_clusterfluentbitconfigs.yaml b/config/crd/bases/fluentbit.fluent.io_clusterfluentbitconfigs.yaml index 43c89effe..31d611b98 100644 --- a/config/crd/bases/fluentbit.fluent.io_clusterfluentbitconfigs.yaml +++ b/config/crd/bases/fluentbit.fluent.io_clusterfluentbitconfigs.yaml @@ -297,6 +297,58 @@ spec: parsersFile: description: Optional 'parsers' config file (can be multiple) type: string + storage: + description: Configure a global environment for the storage layer + in Service. It is recommended to configure the volume and volumeMount + separately for this storage. The hostPath type should be used + for that Volume in Fluentbit daemon set. + properties: + backlogMemLimit: + description: This option configure a hint of maximum value + of memory to use when processing these records + type: string + checksum: + description: Enable the data integrity check when writing + and reading data from the filesystem + enum: + - "on" + - "off" + type: string + deleteIrrecoverableChunks: + description: When enabled, irrecoverable chunks will be deleted + during runtime, and any other irrecoverable chunk located + in the configured storage path directory will be deleted + when Fluent-Bit starts. + enum: + - "on" + - "off" + type: string + maxChunksUp: + description: If the input plugin has enabled filesystem storage + type, this property sets the maximum number of Chunks that + can be up in memory + format: int64 + type: integer + metrics: + description: If http_server option has been enabled in the + Service section, this option registers a new endpoint where + internal metrics of the storage layer can be consumed + enum: + - "on" + - "off" + type: string + path: + description: Select an optional location in the file system + to store streams and chunks of data/ + type: string + sync: + description: Configure the synchronization mode used to store + the data into the file system + enum: + - normal + - full + type: string + type: object type: object type: object type: object diff --git a/config/crd/bases/fluentbit.fluent.io_clusterinputs.yaml b/config/crd/bases/fluentbit.fluent.io_clusterinputs.yaml index fdf86612b..44a71dbf4 100644 --- a/config/crd/bases/fluentbit.fluent.io_clusterinputs.yaml +++ b/config/crd/bases/fluentbit.fluent.io_clusterinputs.yaml @@ -176,6 +176,14 @@ spec: not set, the plugin will use default paths to read local-only logs. type: string + pauseOnChunksOverlimit: + description: Specifies if the input plugin should be paused (stop + ingesting new data) when the storage.max_chunks_up value is + reached. + enum: + - "on" + - "off" + type: string readFromTail: description: Start reading new entries. Skip entries already stored in Journald. @@ -183,6 +191,13 @@ spec: - "on" - "off" type: string + storageType: + description: Specify the buffering mechanism to use. It can be + memory or filesystem + enum: + - filesystem + - memory + type: string stripUnderscores: description: Remove the leading underscore of the Journald field (key). For example the Journald field _PID becomes the key PID. @@ -328,6 +343,14 @@ spec: file as part of the record. The value assigned becomes the key in the map. type: string + pauseOnChunksOverlimit: + description: Specifies if the input plugin should be paused (stop + ingesting new data) when the storage.max_chunks_up value is + reached. + enum: + - "on" + - "off" + type: string readFromHead: description: For new discovered files on start (without a database offset/position), read the content from the head of the file, @@ -350,6 +373,13 @@ spec: behavior and instruct Fluent Bit to skip long lines and continue processing other lines that fits into the buffer size. type: boolean + storageType: + description: Specify the buffering mechanism to use. It can be + memory or filesystem + enum: + - filesystem + - memory + type: string tag: description: Set a tag (with regex-extract fields) that will be placed on lines read. E.g. kube... diff --git a/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml b/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml index ee10b9518..d0e9acc37 100644 --- a/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml +++ b/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml @@ -1846,6 +1846,10 @@ spec: description: Hostname to be used for TLS SNI extension type: string type: object + totalLimitSize: + description: Limit the maximum number of Chunks in the filesystem + for the current output logical destination. + type: string traceError: description: When enabled print the elasticsearch API calls to stdout when elasticsearch returns an error @@ -2214,116 +2218,116 @@ spec: s3: description: S3 defines S3 Output configuration. properties: - auto_retry_requests: + AutoRetryRequests: description: Immediately retry failed requests to AWS services once. type: boolean - bucket: + Bucket: description: S3 Bucket name type: string - canned_acl: + CannedAcl: description: Predefined Canned ACL Policy for S3 objects. type: string - compression: + Compression: description: Compression type for S3 objects. type: string - content_type: + ContentType: description: A standard MIME type for the S3 object; this will be set as the Content-Type HTTP header. type: string - endpoint: + Endpoint: description: Custom endpoint for the S3 API. type: string - external_id: + ExternalId: description: Specify an external ID for the STS API, can be used with the role_arn parameter if your role requires an external ID. type: string - json_date_format: + JsonDateFormat: description: 'Specify the format of the date. Supported formats are double, epoch, iso8601 (eg: 2018-05-30T09:39:52.000681Z) and java_sql_timestamp (eg: 2018-05-30 09:39:52.000681)' type: string - json_date_key: + JsonDateKey: description: Specify the name of the time key in the output record. To disable the time key just set the value to false. type: string - log_key: + LogKey: description: By default, the whole log record will be sent to S3. If you specify a key name with this option, then only the value of that key will be sent to S3. type: string - preserve_data_ordering: + PreserveDataOrdering: description: Normally, when an upload request fails, there is a high chance for the last received chunk to be swapped with a later chunk, resulting in data shuffling. This feature prevents this shuffling by using a queue logic for uploads. type: boolean - region: + Region: description: The AWS region of your S3 bucket type: string - retry_limit: + RetryLimit: description: Integer value to set the maximum number of retries allowed. format: int32 type: integer - role_arn: + RoleArn: description: ARN of an IAM role to assume type: string - s3_key_format: + S3KeyFormat: description: Format string for keys in S3. type: string - s3_key_format_tag_delimiters: + S3KeyFormatTagDelimiters: description: A series of characters which will be used to split the tag into 'parts' for use with the s3_key_format option. type: string - send_content_md5: + SendContentMd5: description: Send the Content-MD5 header with PutObject and UploadPart requests, as is required when Object Lock is enabled. type: boolean - static_file_path: + StaticFilePath: description: Disables behavior where UUID string is automatically appended to end of S3 key name when $UUID is not provided in s3_key_format. $UUID, time formatters, $TAG, and other dynamic key formatters all work as expected while this feature is set to true. type: boolean - storage_class: + StorageClass: description: Specify the storage class for S3 objects. If this option is not specified, objects will be stored with the default 'STANDARD' storage class. type: string - store_dir: + StoreDir: description: Directory to locally buffer data before sending. type: string - store_dir_limit_size: + StoreDirLimitSize: description: The size of the limitation for disk usage in S3. type: string - sts_endpoint: + StsEndpoint: description: Custom endpoint for the STS API. type: string - total_file_size: + TotalFileSize: description: Specifies the size of files in S3. Minimum size is 1M. With use_put_object On the maximum size is 1G. With multipart upload mode, the maximum size is 50G. type: string - upload_chunk_size: + UploadChunkSize: description: 'The size of each ''part'' for multipart uploads. Max: 50M' type: string - upload_timeout: + UploadTimeout: description: Whenever this amount of time has elapsed, Fluent Bit will complete an upload and create a new file in S3. For example, set this value to 60m and you will get a new file every hour. type: string - use_put_object: + UsePutObject: description: Use the S3 PutObject API, instead of the multipart upload API. type: boolean required: - - bucket - - region + - Bucket + - Region type: object splunk: description: Splunk defines Splunk Output Configuration diff --git a/config/crd/bases/fluentbit.fluent.io_outputs.yaml b/config/crd/bases/fluentbit.fluent.io_outputs.yaml index 9b52e800c..e460042bb 100644 --- a/config/crd/bases/fluentbit.fluent.io_outputs.yaml +++ b/config/crd/bases/fluentbit.fluent.io_outputs.yaml @@ -1846,6 +1846,10 @@ spec: description: Hostname to be used for TLS SNI extension type: string type: object + totalLimitSize: + description: Limit the maximum number of Chunks in the filesystem + for the current output logical destination. + type: string traceError: description: When enabled print the elasticsearch API calls to stdout when elasticsearch returns an error @@ -2214,116 +2218,116 @@ spec: s3: description: S3 defines S3 Output configuration. properties: - auto_retry_requests: + AutoRetryRequests: description: Immediately retry failed requests to AWS services once. type: boolean - bucket: + Bucket: description: S3 Bucket name type: string - canned_acl: + CannedAcl: description: Predefined Canned ACL Policy for S3 objects. type: string - compression: + Compression: description: Compression type for S3 objects. type: string - content_type: + ContentType: description: A standard MIME type for the S3 object; this will be set as the Content-Type HTTP header. type: string - endpoint: + Endpoint: description: Custom endpoint for the S3 API. type: string - external_id: + ExternalId: description: Specify an external ID for the STS API, can be used with the role_arn parameter if your role requires an external ID. type: string - json_date_format: + JsonDateFormat: description: 'Specify the format of the date. Supported formats are double, epoch, iso8601 (eg: 2018-05-30T09:39:52.000681Z) and java_sql_timestamp (eg: 2018-05-30 09:39:52.000681)' type: string - json_date_key: + JsonDateKey: description: Specify the name of the time key in the output record. To disable the time key just set the value to false. type: string - log_key: + LogKey: description: By default, the whole log record will be sent to S3. If you specify a key name with this option, then only the value of that key will be sent to S3. type: string - preserve_data_ordering: + PreserveDataOrdering: description: Normally, when an upload request fails, there is a high chance for the last received chunk to be swapped with a later chunk, resulting in data shuffling. This feature prevents this shuffling by using a queue logic for uploads. type: boolean - region: + Region: description: The AWS region of your S3 bucket type: string - retry_limit: + RetryLimit: description: Integer value to set the maximum number of retries allowed. format: int32 type: integer - role_arn: + RoleArn: description: ARN of an IAM role to assume type: string - s3_key_format: + S3KeyFormat: description: Format string for keys in S3. type: string - s3_key_format_tag_delimiters: + S3KeyFormatTagDelimiters: description: A series of characters which will be used to split the tag into 'parts' for use with the s3_key_format option. type: string - send_content_md5: + SendContentMd5: description: Send the Content-MD5 header with PutObject and UploadPart requests, as is required when Object Lock is enabled. type: boolean - static_file_path: + StaticFilePath: description: Disables behavior where UUID string is automatically appended to end of S3 key name when $UUID is not provided in s3_key_format. $UUID, time formatters, $TAG, and other dynamic key formatters all work as expected while this feature is set to true. type: boolean - storage_class: + StorageClass: description: Specify the storage class for S3 objects. If this option is not specified, objects will be stored with the default 'STANDARD' storage class. type: string - store_dir: + StoreDir: description: Directory to locally buffer data before sending. type: string - store_dir_limit_size: + StoreDirLimitSize: description: The size of the limitation for disk usage in S3. type: string - sts_endpoint: + StsEndpoint: description: Custom endpoint for the STS API. type: string - total_file_size: + TotalFileSize: description: Specifies the size of files in S3. Minimum size is 1M. With use_put_object On the maximum size is 1G. With multipart upload mode, the maximum size is 50G. type: string - upload_chunk_size: + UploadChunkSize: description: 'The size of each ''part'' for multipart uploads. Max: 50M' type: string - upload_timeout: + UploadTimeout: description: Whenever this amount of time has elapsed, Fluent Bit will complete an upload and create a new file in S3. For example, set this value to 60m and you will get a new file every hour. type: string - use_put_object: + UsePutObject: description: Use the S3 PutObject API, instead of the multipart upload API. type: boolean required: - - bucket - - region + - Bucket + - Region type: object splunk: description: Splunk defines Splunk Output Configuration diff --git a/config/crd/bases/fluentd.fluent.io_fluentds.yaml b/config/crd/bases/fluentd.fluent.io_fluentds.yaml index 952415f70..91728355e 100644 --- a/config/crd/bases/fluentd.fluent.io_fluentds.yaml +++ b/config/crd/bases/fluentd.fluent.io_fluentds.yaml @@ -1310,7 +1310,7 @@ spec: x-kubernetes-map-type: atomic defaultOutputSelector: description: Select cluster output plugins used to send all logs that - did not match a route to the matching outputs + did not match any route to the matching outputs properties: matchExpressions: description: matchExpressions is a list of label selector requirements. diff --git a/manifests/setup/fluent-operator-crd.yaml b/manifests/setup/fluent-operator-crd.yaml index b681a0519..552aae100 100644 --- a/manifests/setup/fluent-operator-crd.yaml +++ b/manifests/setup/fluent-operator-crd.yaml @@ -1462,6 +1462,58 @@ spec: parsersFile: description: Optional 'parsers' config file (can be multiple) type: string + storage: + description: Configure a global environment for the storage layer + in Service. It is recommended to configure the volume and volumeMount + separately for this storage. The hostPath type should be used + for that Volume in Fluentbit daemon set. + properties: + backlogMemLimit: + description: This option configure a hint of maximum value + of memory to use when processing these records + type: string + checksum: + description: Enable the data integrity check when writing + and reading data from the filesystem + enum: + - "on" + - "off" + type: string + deleteIrrecoverableChunks: + description: When enabled, irrecoverable chunks will be deleted + during runtime, and any other irrecoverable chunk located + in the configured storage path directory will be deleted + when Fluent-Bit starts. + enum: + - "on" + - "off" + type: string + maxChunksUp: + description: If the input plugin has enabled filesystem storage + type, this property sets the maximum number of Chunks that + can be up in memory + format: int64 + type: integer + metrics: + description: If http_server option has been enabled in the + Service section, this option registers a new endpoint where + internal metrics of the storage layer can be consumed + enum: + - "on" + - "off" + type: string + path: + description: Select an optional location in the file system + to store streams and chunks of data/ + type: string + sync: + description: Configure the synchronization mode used to store + the data into the file system + enum: + - normal + - full + type: string + type: object type: object type: object type: object @@ -1826,6 +1878,14 @@ spec: not set, the plugin will use default paths to read local-only logs. type: string + pauseOnChunksOverlimit: + description: Specifies if the input plugin should be paused (stop + ingesting new data) when the storage.max_chunks_up value is + reached. + enum: + - "on" + - "off" + type: string readFromTail: description: Start reading new entries. Skip entries already stored in Journald. @@ -1833,6 +1893,13 @@ spec: - "on" - "off" type: string + storageType: + description: Specify the buffering mechanism to use. It can be + memory or filesystem + enum: + - filesystem + - memory + type: string stripUnderscores: description: Remove the leading underscore of the Journald field (key). For example the Journald field _PID becomes the key PID. @@ -1978,6 +2045,14 @@ spec: file as part of the record. The value assigned becomes the key in the map. type: string + pauseOnChunksOverlimit: + description: Specifies if the input plugin should be paused (stop + ingesting new data) when the storage.max_chunks_up value is + reached. + enum: + - "on" + - "off" + type: string readFromHead: description: For new discovered files on start (without a database offset/position), read the content from the head of the file, @@ -2000,6 +2075,13 @@ spec: behavior and instruct Fluent Bit to skip long lines and continue processing other lines that fits into the buffer size. type: boolean + storageType: + description: Specify the buffering mechanism to use. It can be + memory or filesystem + enum: + - filesystem + - memory + type: string tag: description: Set a tag (with regex-extract fields) that will be placed on lines read. E.g. kube... @@ -3859,6 +3941,10 @@ spec: description: Hostname to be used for TLS SNI extension type: string type: object + totalLimitSize: + description: Limit the maximum number of Chunks in the filesystem + for the current output logical destination. + type: string traceError: description: When enabled print the elasticsearch API calls to stdout when elasticsearch returns an error @@ -4227,116 +4313,116 @@ spec: s3: description: S3 defines S3 Output configuration. properties: - auto_retry_requests: + AutoRetryRequests: description: Immediately retry failed requests to AWS services once. type: boolean - bucket: + Bucket: description: S3 Bucket name type: string - canned_acl: + CannedAcl: description: Predefined Canned ACL Policy for S3 objects. type: string - compression: + Compression: description: Compression type for S3 objects. type: string - content_type: + ContentType: description: A standard MIME type for the S3 object; this will be set as the Content-Type HTTP header. type: string - endpoint: + Endpoint: description: Custom endpoint for the S3 API. type: string - external_id: + ExternalId: description: Specify an external ID for the STS API, can be used with the role_arn parameter if your role requires an external ID. type: string - json_date_format: + JsonDateFormat: description: 'Specify the format of the date. Supported formats are double, epoch, iso8601 (eg: 2018-05-30T09:39:52.000681Z) and java_sql_timestamp (eg: 2018-05-30 09:39:52.000681)' type: string - json_date_key: + JsonDateKey: description: Specify the name of the time key in the output record. To disable the time key just set the value to false. type: string - log_key: + LogKey: description: By default, the whole log record will be sent to S3. If you specify a key name with this option, then only the value of that key will be sent to S3. type: string - preserve_data_ordering: + PreserveDataOrdering: description: Normally, when an upload request fails, there is a high chance for the last received chunk to be swapped with a later chunk, resulting in data shuffling. This feature prevents this shuffling by using a queue logic for uploads. type: boolean - region: + Region: description: The AWS region of your S3 bucket type: string - retry_limit: + RetryLimit: description: Integer value to set the maximum number of retries allowed. format: int32 type: integer - role_arn: + RoleArn: description: ARN of an IAM role to assume type: string - s3_key_format: + S3KeyFormat: description: Format string for keys in S3. type: string - s3_key_format_tag_delimiters: + S3KeyFormatTagDelimiters: description: A series of characters which will be used to split the tag into 'parts' for use with the s3_key_format option. type: string - send_content_md5: + SendContentMd5: description: Send the Content-MD5 header with PutObject and UploadPart requests, as is required when Object Lock is enabled. type: boolean - static_file_path: + StaticFilePath: description: Disables behavior where UUID string is automatically appended to end of S3 key name when $UUID is not provided in s3_key_format. $UUID, time formatters, $TAG, and other dynamic key formatters all work as expected while this feature is set to true. type: boolean - storage_class: + StorageClass: description: Specify the storage class for S3 objects. If this option is not specified, objects will be stored with the default 'STANDARD' storage class. type: string - store_dir: + StoreDir: description: Directory to locally buffer data before sending. type: string - store_dir_limit_size: + StoreDirLimitSize: description: The size of the limitation for disk usage in S3. type: string - sts_endpoint: + StsEndpoint: description: Custom endpoint for the STS API. type: string - total_file_size: + TotalFileSize: description: Specifies the size of files in S3. Minimum size is 1M. With use_put_object On the maximum size is 1G. With multipart upload mode, the maximum size is 50G. type: string - upload_chunk_size: + UploadChunkSize: description: 'The size of each ''part'' for multipart uploads. Max: 50M' type: string - upload_timeout: + UploadTimeout: description: Whenever this amount of time has elapsed, Fluent Bit will complete an upload and create a new file in S3. For example, set this value to 60m and you will get a new file every hour. type: string - use_put_object: + UsePutObject: description: Use the S3 PutObject API, instead of the multipart upload API. type: boolean required: - - bucket - - region + - Bucket + - Region type: object splunk: description: Splunk defines Splunk Output Configuration @@ -19376,7 +19462,7 @@ spec: x-kubernetes-map-type: atomic defaultOutputSelector: description: Select cluster output plugins used to send all logs that - did not match a route to the matching outputs + did not match any route to the matching outputs properties: matchExpressions: description: matchExpressions is a list of label selector requirements. @@ -24488,6 +24574,10 @@ spec: description: Hostname to be used for TLS SNI extension type: string type: object + totalLimitSize: + description: Limit the maximum number of Chunks in the filesystem + for the current output logical destination. + type: string traceError: description: When enabled print the elasticsearch API calls to stdout when elasticsearch returns an error @@ -24856,116 +24946,116 @@ spec: s3: description: S3 defines S3 Output configuration. properties: - auto_retry_requests: + AutoRetryRequests: description: Immediately retry failed requests to AWS services once. type: boolean - bucket: + Bucket: description: S3 Bucket name type: string - canned_acl: + CannedAcl: description: Predefined Canned ACL Policy for S3 objects. type: string - compression: + Compression: description: Compression type for S3 objects. type: string - content_type: + ContentType: description: A standard MIME type for the S3 object; this will be set as the Content-Type HTTP header. type: string - endpoint: + Endpoint: description: Custom endpoint for the S3 API. type: string - external_id: + ExternalId: description: Specify an external ID for the STS API, can be used with the role_arn parameter if your role requires an external ID. type: string - json_date_format: + JsonDateFormat: description: 'Specify the format of the date. Supported formats are double, epoch, iso8601 (eg: 2018-05-30T09:39:52.000681Z) and java_sql_timestamp (eg: 2018-05-30 09:39:52.000681)' type: string - json_date_key: + JsonDateKey: description: Specify the name of the time key in the output record. To disable the time key just set the value to false. type: string - log_key: + LogKey: description: By default, the whole log record will be sent to S3. If you specify a key name with this option, then only the value of that key will be sent to S3. type: string - preserve_data_ordering: + PreserveDataOrdering: description: Normally, when an upload request fails, there is a high chance for the last received chunk to be swapped with a later chunk, resulting in data shuffling. This feature prevents this shuffling by using a queue logic for uploads. type: boolean - region: + Region: description: The AWS region of your S3 bucket type: string - retry_limit: + RetryLimit: description: Integer value to set the maximum number of retries allowed. format: int32 type: integer - role_arn: + RoleArn: description: ARN of an IAM role to assume type: string - s3_key_format: + S3KeyFormat: description: Format string for keys in S3. type: string - s3_key_format_tag_delimiters: + S3KeyFormatTagDelimiters: description: A series of characters which will be used to split the tag into 'parts' for use with the s3_key_format option. type: string - send_content_md5: + SendContentMd5: description: Send the Content-MD5 header with PutObject and UploadPart requests, as is required when Object Lock is enabled. type: boolean - static_file_path: + StaticFilePath: description: Disables behavior where UUID string is automatically appended to end of S3 key name when $UUID is not provided in s3_key_format. $UUID, time formatters, $TAG, and other dynamic key formatters all work as expected while this feature is set to true. type: boolean - storage_class: + StorageClass: description: Specify the storage class for S3 objects. If this option is not specified, objects will be stored with the default 'STANDARD' storage class. type: string - store_dir: + StoreDir: description: Directory to locally buffer data before sending. type: string - store_dir_limit_size: + StoreDirLimitSize: description: The size of the limitation for disk usage in S3. type: string - sts_endpoint: + StsEndpoint: description: Custom endpoint for the STS API. type: string - total_file_size: + TotalFileSize: description: Specifies the size of files in S3. Minimum size is 1M. With use_put_object On the maximum size is 1G. With multipart upload mode, the maximum size is 50G. type: string - upload_chunk_size: + UploadChunkSize: description: 'The size of each ''part'' for multipart uploads. Max: 50M' type: string - upload_timeout: + UploadTimeout: description: Whenever this amount of time has elapsed, Fluent Bit will complete an upload and create a new file in S3. For example, set this value to 60m and you will get a new file every hour. type: string - use_put_object: + UsePutObject: description: Use the S3 PutObject API, instead of the multipart upload API. type: boolean required: - - bucket - - region + - Bucket + - Region type: object splunk: description: Splunk defines Splunk Output Configuration diff --git a/manifests/setup/setup.yaml b/manifests/setup/setup.yaml index a51e4e9a8..4a2575e6a 100644 --- a/manifests/setup/setup.yaml +++ b/manifests/setup/setup.yaml @@ -1462,6 +1462,58 @@ spec: parsersFile: description: Optional 'parsers' config file (can be multiple) type: string + storage: + description: Configure a global environment for the storage layer + in Service. It is recommended to configure the volume and volumeMount + separately for this storage. The hostPath type should be used + for that Volume in Fluentbit daemon set. + properties: + backlogMemLimit: + description: This option configure a hint of maximum value + of memory to use when processing these records + type: string + checksum: + description: Enable the data integrity check when writing + and reading data from the filesystem + enum: + - "on" + - "off" + type: string + deleteIrrecoverableChunks: + description: When enabled, irrecoverable chunks will be deleted + during runtime, and any other irrecoverable chunk located + in the configured storage path directory will be deleted + when Fluent-Bit starts. + enum: + - "on" + - "off" + type: string + maxChunksUp: + description: If the input plugin has enabled filesystem storage + type, this property sets the maximum number of Chunks that + can be up in memory + format: int64 + type: integer + metrics: + description: If http_server option has been enabled in the + Service section, this option registers a new endpoint where + internal metrics of the storage layer can be consumed + enum: + - "on" + - "off" + type: string + path: + description: Select an optional location in the file system + to store streams and chunks of data/ + type: string + sync: + description: Configure the synchronization mode used to store + the data into the file system + enum: + - normal + - full + type: string + type: object type: object type: object type: object @@ -1826,6 +1878,14 @@ spec: not set, the plugin will use default paths to read local-only logs. type: string + pauseOnChunksOverlimit: + description: Specifies if the input plugin should be paused (stop + ingesting new data) when the storage.max_chunks_up value is + reached. + enum: + - "on" + - "off" + type: string readFromTail: description: Start reading new entries. Skip entries already stored in Journald. @@ -1833,6 +1893,13 @@ spec: - "on" - "off" type: string + storageType: + description: Specify the buffering mechanism to use. It can be + memory or filesystem + enum: + - filesystem + - memory + type: string stripUnderscores: description: Remove the leading underscore of the Journald field (key). For example the Journald field _PID becomes the key PID. @@ -1978,6 +2045,14 @@ spec: file as part of the record. The value assigned becomes the key in the map. type: string + pauseOnChunksOverlimit: + description: Specifies if the input plugin should be paused (stop + ingesting new data) when the storage.max_chunks_up value is + reached. + enum: + - "on" + - "off" + type: string readFromHead: description: For new discovered files on start (without a database offset/position), read the content from the head of the file, @@ -2000,6 +2075,13 @@ spec: behavior and instruct Fluent Bit to skip long lines and continue processing other lines that fits into the buffer size. type: boolean + storageType: + description: Specify the buffering mechanism to use. It can be + memory or filesystem + enum: + - filesystem + - memory + type: string tag: description: Set a tag (with regex-extract fields) that will be placed on lines read. E.g. kube... @@ -3859,6 +3941,10 @@ spec: description: Hostname to be used for TLS SNI extension type: string type: object + totalLimitSize: + description: Limit the maximum number of Chunks in the filesystem + for the current output logical destination. + type: string traceError: description: When enabled print the elasticsearch API calls to stdout when elasticsearch returns an error @@ -4227,116 +4313,116 @@ spec: s3: description: S3 defines S3 Output configuration. properties: - auto_retry_requests: + AutoRetryRequests: description: Immediately retry failed requests to AWS services once. type: boolean - bucket: + Bucket: description: S3 Bucket name type: string - canned_acl: + CannedAcl: description: Predefined Canned ACL Policy for S3 objects. type: string - compression: + Compression: description: Compression type for S3 objects. type: string - content_type: + ContentType: description: A standard MIME type for the S3 object; this will be set as the Content-Type HTTP header. type: string - endpoint: + Endpoint: description: Custom endpoint for the S3 API. type: string - external_id: + ExternalId: description: Specify an external ID for the STS API, can be used with the role_arn parameter if your role requires an external ID. type: string - json_date_format: + JsonDateFormat: description: 'Specify the format of the date. Supported formats are double, epoch, iso8601 (eg: 2018-05-30T09:39:52.000681Z) and java_sql_timestamp (eg: 2018-05-30 09:39:52.000681)' type: string - json_date_key: + JsonDateKey: description: Specify the name of the time key in the output record. To disable the time key just set the value to false. type: string - log_key: + LogKey: description: By default, the whole log record will be sent to S3. If you specify a key name with this option, then only the value of that key will be sent to S3. type: string - preserve_data_ordering: + PreserveDataOrdering: description: Normally, when an upload request fails, there is a high chance for the last received chunk to be swapped with a later chunk, resulting in data shuffling. This feature prevents this shuffling by using a queue logic for uploads. type: boolean - region: + Region: description: The AWS region of your S3 bucket type: string - retry_limit: + RetryLimit: description: Integer value to set the maximum number of retries allowed. format: int32 type: integer - role_arn: + RoleArn: description: ARN of an IAM role to assume type: string - s3_key_format: + S3KeyFormat: description: Format string for keys in S3. type: string - s3_key_format_tag_delimiters: + S3KeyFormatTagDelimiters: description: A series of characters which will be used to split the tag into 'parts' for use with the s3_key_format option. type: string - send_content_md5: + SendContentMd5: description: Send the Content-MD5 header with PutObject and UploadPart requests, as is required when Object Lock is enabled. type: boolean - static_file_path: + StaticFilePath: description: Disables behavior where UUID string is automatically appended to end of S3 key name when $UUID is not provided in s3_key_format. $UUID, time formatters, $TAG, and other dynamic key formatters all work as expected while this feature is set to true. type: boolean - storage_class: + StorageClass: description: Specify the storage class for S3 objects. If this option is not specified, objects will be stored with the default 'STANDARD' storage class. type: string - store_dir: + StoreDir: description: Directory to locally buffer data before sending. type: string - store_dir_limit_size: + StoreDirLimitSize: description: The size of the limitation for disk usage in S3. type: string - sts_endpoint: + StsEndpoint: description: Custom endpoint for the STS API. type: string - total_file_size: + TotalFileSize: description: Specifies the size of files in S3. Minimum size is 1M. With use_put_object On the maximum size is 1G. With multipart upload mode, the maximum size is 50G. type: string - upload_chunk_size: + UploadChunkSize: description: 'The size of each ''part'' for multipart uploads. Max: 50M' type: string - upload_timeout: + UploadTimeout: description: Whenever this amount of time has elapsed, Fluent Bit will complete an upload and create a new file in S3. For example, set this value to 60m and you will get a new file every hour. type: string - use_put_object: + UsePutObject: description: Use the S3 PutObject API, instead of the multipart upload API. type: boolean required: - - bucket - - region + - Bucket + - Region type: object splunk: description: Splunk defines Splunk Output Configuration @@ -19376,7 +19462,7 @@ spec: x-kubernetes-map-type: atomic defaultOutputSelector: description: Select cluster output plugins used to send all logs that - did not match a route to the matching outputs + did not match any route to the matching outputs properties: matchExpressions: description: matchExpressions is a list of label selector requirements. @@ -24488,6 +24574,10 @@ spec: description: Hostname to be used for TLS SNI extension type: string type: object + totalLimitSize: + description: Limit the maximum number of Chunks in the filesystem + for the current output logical destination. + type: string traceError: description: When enabled print the elasticsearch API calls to stdout when elasticsearch returns an error @@ -24856,116 +24946,116 @@ spec: s3: description: S3 defines S3 Output configuration. properties: - auto_retry_requests: + AutoRetryRequests: description: Immediately retry failed requests to AWS services once. type: boolean - bucket: + Bucket: description: S3 Bucket name type: string - canned_acl: + CannedAcl: description: Predefined Canned ACL Policy for S3 objects. type: string - compression: + Compression: description: Compression type for S3 objects. type: string - content_type: + ContentType: description: A standard MIME type for the S3 object; this will be set as the Content-Type HTTP header. type: string - endpoint: + Endpoint: description: Custom endpoint for the S3 API. type: string - external_id: + ExternalId: description: Specify an external ID for the STS API, can be used with the role_arn parameter if your role requires an external ID. type: string - json_date_format: + JsonDateFormat: description: 'Specify the format of the date. Supported formats are double, epoch, iso8601 (eg: 2018-05-30T09:39:52.000681Z) and java_sql_timestamp (eg: 2018-05-30 09:39:52.000681)' type: string - json_date_key: + JsonDateKey: description: Specify the name of the time key in the output record. To disable the time key just set the value to false. type: string - log_key: + LogKey: description: By default, the whole log record will be sent to S3. If you specify a key name with this option, then only the value of that key will be sent to S3. type: string - preserve_data_ordering: + PreserveDataOrdering: description: Normally, when an upload request fails, there is a high chance for the last received chunk to be swapped with a later chunk, resulting in data shuffling. This feature prevents this shuffling by using a queue logic for uploads. type: boolean - region: + Region: description: The AWS region of your S3 bucket type: string - retry_limit: + RetryLimit: description: Integer value to set the maximum number of retries allowed. format: int32 type: integer - role_arn: + RoleArn: description: ARN of an IAM role to assume type: string - s3_key_format: + S3KeyFormat: description: Format string for keys in S3. type: string - s3_key_format_tag_delimiters: + S3KeyFormatTagDelimiters: description: A series of characters which will be used to split the tag into 'parts' for use with the s3_key_format option. type: string - send_content_md5: + SendContentMd5: description: Send the Content-MD5 header with PutObject and UploadPart requests, as is required when Object Lock is enabled. type: boolean - static_file_path: + StaticFilePath: description: Disables behavior where UUID string is automatically appended to end of S3 key name when $UUID is not provided in s3_key_format. $UUID, time formatters, $TAG, and other dynamic key formatters all work as expected while this feature is set to true. type: boolean - storage_class: + StorageClass: description: Specify the storage class for S3 objects. If this option is not specified, objects will be stored with the default 'STANDARD' storage class. type: string - store_dir: + StoreDir: description: Directory to locally buffer data before sending. type: string - store_dir_limit_size: + StoreDirLimitSize: description: The size of the limitation for disk usage in S3. type: string - sts_endpoint: + StsEndpoint: description: Custom endpoint for the STS API. type: string - total_file_size: + TotalFileSize: description: Specifies the size of files in S3. Minimum size is 1M. With use_put_object On the maximum size is 1G. With multipart upload mode, the maximum size is 50G. type: string - upload_chunk_size: + UploadChunkSize: description: 'The size of each ''part'' for multipart uploads. Max: 50M' type: string - upload_timeout: + UploadTimeout: description: Whenever this amount of time has elapsed, Fluent Bit will complete an upload and create a new file in S3. For example, set this value to 60m and you will get a new file every hour. type: string - use_put_object: + UsePutObject: description: Use the S3 PutObject API, instead of the multipart upload API. type: boolean required: - - bucket - - region + - Bucket + - Region type: object splunk: description: Splunk defines Splunk Output Configuration From 2dfdc190b3d1aabef637004900bfb09f9b964434 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 13 Jul 2023 10:15:07 +0800 Subject: [PATCH 74/78] build(deps): Bump k8s.io/apimachinery from 0.27.2 to 0.27.3 (#828) Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.27.2 to 0.27.3. - [Commits](https://github.com/kubernetes/apimachinery/compare/v0.27.2...v0.27.3) --- updated-dependencies: - dependency-name: k8s.io/apimachinery dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 6 +----- go.sum | 15 ++------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/go.mod b/go.mod index a8b213f0e..d1ce8e4bb 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/onsi/ginkgo v1.16.5 github.com/onsi/gomega v1.27.8 k8s.io/api v0.26.3 - k8s.io/apimachinery v0.27.2 + k8s.io/apimachinery v0.27.3 k8s.io/client-go v0.26.3 k8s.io/klog/v2 v2.100.1 sigs.k8s.io/controller-runtime v0.14.6 @@ -58,14 +58,12 @@ require ( go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.7.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/mod v0.10.0 // indirect golang.org/x/net v0.10.0 // indirect golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect golang.org/x/sys v0.8.0 // indirect golang.org/x/term v0.8.0 // indirect golang.org/x/text v0.9.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.9.1 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.28.1 // indirect @@ -74,9 +72,7 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.26.1 // indirect - k8s.io/code-generator v0.26.1 // indirect k8s.io/component-base v0.26.1 // indirect - k8s.io/gengo v0.0.0-20220902162205-c0856e24416d // indirect k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect diff --git a/go.sum b/go.sum index bc5b31c72..641313c9a 100644 --- a/go.sum +++ b/go.sum @@ -89,7 +89,6 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= @@ -350,8 +349,6 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= -golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -506,7 +503,6 @@ golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjs golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -517,7 +513,6 @@ golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= -golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -641,17 +636,12 @@ k8s.io/api v0.26.3 h1:emf74GIQMTik01Aum9dPP0gAypL8JTLl/lHa4V9RFSU= k8s.io/api v0.26.3/go.mod h1:PXsqwPMXBSBcL1lJ9CYDKy7kIReUydukS5JiRlxC3qE= k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI= k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM= -k8s.io/apimachinery v0.27.2 h1:vBjGaKKieaIreI+oQwELalVG4d8f3YAMNpWLzDXkxeg= -k8s.io/apimachinery v0.27.2/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= +k8s.io/apimachinery v0.27.3 h1:Ubye8oBufD04l9QnNtW05idcOe9Z3GQN8+7PqmuVcUM= +k8s.io/apimachinery v0.27.3/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= k8s.io/client-go v0.26.3 h1:k1UY+KXfkxV2ScEL3gilKcF7761xkYsSD6BC9szIu8s= k8s.io/client-go v0.26.3/go.mod h1:ZPNu9lm8/dbRIPAgteN30RSXea6vrCpFvq+MateTUuQ= -k8s.io/code-generator v0.26.1 h1:dusFDsnNSKlMFYhzIM0jAO1OlnTN5WYwQQ+Ai12IIlo= -k8s.io/code-generator v0.26.1/go.mod h1:OMoJ5Dqx1wgaQzKgc+ZWaZPfGjdRq/Y3WubFrZmeI3I= k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= -k8s.io/gengo v0.0.0-20220902162205-c0856e24416d h1:U9tB195lKdzwqicbJvyJeOXV7Klv+wNAWENRnXEGi08= -k8s.io/gengo v0.0.0-20220902162205-c0856e24416d/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= @@ -667,6 +657,5 @@ sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMm sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= From 95955c5a6a0edf004d9ef0ffa2e4752a36c5dedd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 13 Jul 2023 10:16:30 +0800 Subject: [PATCH 75/78] build(deps): Bump golang in /cmd/fluent-manager (#830) Bumps golang from 1.20.5-alpine3.17 to 1.20.6-alpine3.17. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/fluent-manager/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/fluent-manager/Dockerfile b/cmd/fluent-manager/Dockerfile index 50a702a14..dad8fcf22 100644 --- a/cmd/fluent-manager/Dockerfile +++ b/cmd/fluent-manager/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM --platform=$BUILDPLATFORM golang:1.20.5-alpine3.17 as builder +FROM --platform=$BUILDPLATFORM golang:1.20.6-alpine3.17 as builder WORKDIR /workspace # Copy the Go Modules manifests From 9085a2cc1bb8e6060bc1b9daa0c304ecdb5a2a6a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 13 Jul 2023 10:18:55 +0800 Subject: [PATCH 76/78] build(deps): Bump golang in /docs/best-practice/forwarding-logs-via-http (#831) Bumps golang from 1.20.4 to 1.20.6. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- docs/best-practice/forwarding-logs-via-http/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/best-practice/forwarding-logs-via-http/Dockerfile b/docs/best-practice/forwarding-logs-via-http/Dockerfile index e038d57a1..a115ba20d 100644 --- a/docs/best-practice/forwarding-logs-via-http/Dockerfile +++ b/docs/best-practice/forwarding-logs-via-http/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.20.4 as builder +FROM golang:1.20.6 as builder WORKDIR / COPY main.go /go/src/main.go From 8534c470309ff1d138bd8ddcdd68e2e51f4fb84c Mon Sep 17 00:00:00 2001 From: dehaocheng Date: Thu, 13 Jul 2023 14:09:07 +0800 Subject: [PATCH 77/78] Fluent-bit upgrade to v2.1.6 Signed-off-by: dehaocheng --- .github/workflows/build-fb-image.yaml | 4 ++-- Makefile | 4 ++-- charts/fluent-operator/values.yaml | 2 +- cmd/fluent-watcher/fluentbit/Dockerfile | 2 +- cmd/fluent-watcher/fluentbit/Dockerfile.debug | 2 +- manifests/kubeedge/fluentbit-fluentbit-edge.yaml | 2 +- manifests/logging-stack/fluentbit-fluentBit.yaml | 2 +- manifests/quick-start/fluentbit.yaml | 2 +- manifests/regex-parser/fluentbit-fluentBit.yaml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-fb-image.yaml b/.github/workflows/build-fb-image.yaml index 7248a3078..ba818cf35 100644 --- a/.github/workflows/build-fb-image.yaml +++ b/.github/workflows/build-fb-image.yaml @@ -13,8 +13,8 @@ on: - "pkg/filenotify/**" env: - FB_IMG: 'kubesphere/fluent-bit:v2.1.4' - FB_IMG_DEBUG: 'kubesphere/fluent-bit:v2.1.4-debug' + FB_IMG: 'kubesphere/fluent-bit:v2.1.6' + FB_IMG_DEBUG: 'kubesphere/fluent-bit:v2.1.6-debug' jobs: build: diff --git a/Makefile b/Makefile index 3cd740757..7b7522316 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ VERSION?=$(shell cat VERSION | tr -d " \t\n\r") # Image URL to use all building/pushing image targets -FB_IMG ?= kubesphere/fluent-bit:v2.1.4 -FB_IMG_DEBUG ?= kubesphere/fluent-bit:v2.1.4-debug +FB_IMG ?= kubesphere/fluent-bit:v2.1.6 +FB_IMG_DEBUG ?= kubesphere/fluent-bit:v2.1.6-debug FD_IMG ?= kubesphere/fluentd:v1.15.3 FO_IMG ?= kubesphere/fluent-operator:$(VERSION) FD_IMG_BASE ?= kubesphere/fluentd:v1.15.3-arm64-base diff --git a/charts/fluent-operator/values.yaml b/charts/fluent-operator/values.yaml index fad472c21..93244719e 100644 --- a/charts/fluent-operator/values.yaml +++ b/charts/fluent-operator/values.yaml @@ -71,7 +71,7 @@ fluentbit: enable: true image: repository: "kubesphere/fluent-bit" - tag: "v2.1.4" + tag: "v2.1.6" # fluentbit resources. If you do want to specify resources, adjust them as necessary # You can adjust it based on the log volume. resources: diff --git a/cmd/fluent-watcher/fluentbit/Dockerfile b/cmd/fluent-watcher/fluentbit/Dockerfile index b87cba03d..d43d26c8d 100644 --- a/cmd/fluent-watcher/fluentbit/Dockerfile +++ b/cmd/fluent-watcher/fluentbit/Dockerfile @@ -6,7 +6,7 @@ WORKDIR /code RUN echo $(ls -al /code) RUN CGO_ENABLED=0 go build -ldflags '-w -s' -o /fluent-bit/fluent-bit /code/cmd/fluent-watcher/fluentbit/main.go -FROM fluent/fluent-bit:2.1.4 +FROM fluent/fluent-bit:2.1.6 LABEL Description="Fluent Bit docker image" Vendor="Fluent" Version="1.0" COPY conf/fluent-bit.conf conf/parsers.conf /fluent-bit/etc/ diff --git a/cmd/fluent-watcher/fluentbit/Dockerfile.debug b/cmd/fluent-watcher/fluentbit/Dockerfile.debug index 045f40481..cf335818e 100644 --- a/cmd/fluent-watcher/fluentbit/Dockerfile.debug +++ b/cmd/fluent-watcher/fluentbit/Dockerfile.debug @@ -6,7 +6,7 @@ WORKDIR /code RUN echo $(ls -al /code) RUN CGO_ENABLED=0 go build -ldflags '-w -s' -o /fluent-bit/fluent-bit /code/cmd/fluent-watcher/fluentbit/main.go -FROM fluent/fluent-bit:2.1.4-debug +FROM fluent/fluent-bit:2.1.6-debug LABEL Description="Fluent Bit docker image" Vendor="Fluent" Version="1.0" COPY conf/fluent-bit.conf conf/parsers.conf /fluent-bit/etc/ diff --git a/manifests/kubeedge/fluentbit-fluentbit-edge.yaml b/manifests/kubeedge/fluentbit-fluentbit-edge.yaml index 6cd76ee5a..22afeea48 100644 --- a/manifests/kubeedge/fluentbit-fluentbit-edge.yaml +++ b/manifests/kubeedge/fluentbit-fluentbit-edge.yaml @@ -6,7 +6,7 @@ metadata: labels: app.kubernetes.io/name: fluent-bit spec: - image: kubesphere/fluent-bit:v2.1.4 + image: kubesphere/fluent-bit:v2.1.6 positionDB: hostPath: path: /var/lib/fluent-bit/ diff --git a/manifests/logging-stack/fluentbit-fluentBit.yaml b/manifests/logging-stack/fluentbit-fluentBit.yaml index 19eca277e..89b34f955 100644 --- a/manifests/logging-stack/fluentbit-fluentBit.yaml +++ b/manifests/logging-stack/fluentbit-fluentBit.yaml @@ -6,7 +6,7 @@ metadata: labels: app.kubernetes.io/name: fluent-bit spec: - image: kubesphere/fluent-bit:v2.1.4 + image: kubesphere/fluent-bit:v2.1.6 positionDB: hostPath: path: /var/lib/fluent-bit/ diff --git a/manifests/quick-start/fluentbit.yaml b/manifests/quick-start/fluentbit.yaml index 0167c4c08..a2139a4e0 100644 --- a/manifests/quick-start/fluentbit.yaml +++ b/manifests/quick-start/fluentbit.yaml @@ -6,7 +6,7 @@ metadata: labels: app.kubernetes.io/name: fluent-bit spec: - image: kubesphere/fluent-bit:v2.1.4 + image: kubesphere/fluent-bit:v2.1.6 fluentBitConfigName: fluent-bit-config --- diff --git a/manifests/regex-parser/fluentbit-fluentBit.yaml b/manifests/regex-parser/fluentbit-fluentBit.yaml index 0a79930ad..70abede08 100644 --- a/manifests/regex-parser/fluentbit-fluentBit.yaml +++ b/manifests/regex-parser/fluentbit-fluentBit.yaml @@ -6,5 +6,5 @@ metadata: labels: app.kubernetes.io/name: fluent-bit spec: - image: kubesphere/fluent-bit:v2.1.4 + image: kubesphere/fluent-bit:v2.1.6 fluentBitConfigName: fluent-bit-config From 42023bed3ac4df157f412f5836f3b13af8b71634 Mon Sep 17 00:00:00 2001 From: karan k Date: Mon, 17 Jul 2023 13:27:53 +0530 Subject: [PATCH 78/78] add support to run fluentbit as daemonset Signed-off-by: karan k --- .../v1alpha2/zz_generated.deepcopy.go | 25 + apis/fluentd/v1alpha1/fluentd_types.go | 11 + .../fluentd/v1alpha1/zz_generated.deepcopy.go | 6 + .../crds/fluentd.fluent.io_fluentds.yaml | 1716 ++++++++++++++++- .../templates/fluentd-fluentd.yaml | 1 + charts/fluent-operator/values.yaml | 6 + .../crd/bases/fluentd.fluent.io_fluentds.yaml | 1716 ++++++++++++++++- controllers/consts.go | 1 + controllers/fluent_controller_finalizer.go | 22 +- controllers/fluentd_controller.go | 58 +- go.mod | 4 + go.sum | 11 + manifests/setup/fluent-operator-crd.yaml | 1716 ++++++++++++++++- manifests/setup/setup.yaml | 1716 ++++++++++++++++- pkg/operator/fluentd-daemonset.go | 195 ++ pkg/operator/sts.go | 6 +- 16 files changed, 7195 insertions(+), 15 deletions(-) create mode 100644 pkg/operator/fluentd-daemonset.go diff --git a/apis/fluentbit/v1alpha2/zz_generated.deepcopy.go b/apis/fluentbit/v1alpha2/zz_generated.deepcopy.go index 4ba987718..8cb4a4675 100644 --- a/apis/fluentbit/v1alpha2/zz_generated.deepcopy.go +++ b/apis/fluentbit/v1alpha2/zz_generated.deepcopy.go @@ -1501,6 +1501,11 @@ func (in *Service) DeepCopyInto(out *Service) { *out = new(bool) **out = **in } + if in.Storage != nil { + in, out := &in.Storage, &out.Storage + *out = new(Storage) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service. @@ -1512,3 +1517,23 @@ func (in *Service) DeepCopy() *Service { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Storage) DeepCopyInto(out *Storage) { + *out = *in + if in.MaxChunksUp != nil { + in, out := &in.MaxChunksUp, &out.MaxChunksUp + *out = new(int64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Storage. +func (in *Storage) DeepCopy() *Storage { + if in == nil { + return nil + } + out := new(Storage) + in.DeepCopyInto(out) + return out +} diff --git a/apis/fluentd/v1alpha1/fluentd_types.go b/apis/fluentd/v1alpha1/fluentd_types.go index 7697d9fbf..e86abd699 100644 --- a/apis/fluentd/v1alpha1/fluentd_types.go +++ b/apis/fluentd/v1alpha1/fluentd_types.go @@ -43,6 +43,7 @@ type FluentdSpec struct { // By default will build the related service according to the globalinputs definition. DisableService bool `json:"disableService,omitempty"` // Numbers of the Fluentd instance + // Applicable when the mode is "collector", and will be ignored when the mode is "agent" Replicas *int32 `json:"replicas,omitempty"` // Numbers of the workers in Fluentd instance Workers *int32 `json:"workers,omitempty"` @@ -92,6 +93,7 @@ type FluentdSpec struct { // claims in a way that maintains the identity of a pod. Every claim in // this list must have at least one matching (by name) volumeMount in one // container in the template. + // Applicable when the mode is "collector", and will be ignored when the mode is "agent" VolumeClaimTemplates []corev1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"` // Service represents configurations on the fluentd service. Service FluentDService `json:"service,omitempty"` @@ -99,6 +101,15 @@ type FluentdSpec struct { SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"` // SchedulerName represents the desired scheduler for fluentd pods. SchedulerName string `json:"schedulerName,omitempty"` + // Mode to determine whether to run Fluentd as collector or agent. + // +kubebuilder:validation:Enum:=collector;agent + // +kubebuilder:default:=collector + Mode string `json:"mode,omitempty"` + // ContainerSecurityContext represents the security context for the fluentd container. + ContainerSecurityContext *corev1.SecurityContext `json:"containerSecurityContext,omitempty"` + // Storage for position db. You will use it if tail input is enabled. + // Applicable when the mode is "agent", and will be ignored when the mode is "collector" + PositionDB corev1.VolumeSource `json:"positionDB,omitempty"` } // FluentDService the service of the FluentD diff --git a/apis/fluentd/v1alpha1/zz_generated.deepcopy.go b/apis/fluentd/v1alpha1/zz_generated.deepcopy.go index 4720d5b6e..261ed1915 100644 --- a/apis/fluentd/v1alpha1/zz_generated.deepcopy.go +++ b/apis/fluentd/v1alpha1/zz_generated.deepcopy.go @@ -805,6 +805,12 @@ func (in *FluentdSpec) DeepCopyInto(out *FluentdSpec) { *out = new(corev1.PodSecurityContext) (*in).DeepCopyInto(*out) } + if in.ContainerSecurityContext != nil { + in, out := &in.ContainerSecurityContext, &out.ContainerSecurityContext + *out = new(corev1.SecurityContext) + (*in).DeepCopyInto(*out) + } + in.PositionDB.DeepCopyInto(&out.PositionDB) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FluentdSpec. diff --git a/charts/fluent-operator/charts/fluentd-crds/crds/fluentd.fluent.io_fluentds.yaml b/charts/fluent-operator/charts/fluentd-crds/crds/fluentd.fluent.io_fluentds.yaml index 91728355e..bd48cd838 100644 --- a/charts/fluent-operator/charts/fluentd-crds/crds/fluentd.fluent.io_fluentds.yaml +++ b/charts/fluent-operator/charts/fluentd-crds/crds/fluentd.fluent.io_fluentds.yaml @@ -1262,6 +1262,166 @@ spec: type: object type: object type: object + containerSecurityContext: + description: ContainerSecurityContext represents the security context + for the fluentd container. + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether a process + can gain more privileges than its parent process. This bool + directly controls if the no_new_privs flag will be set on the + container process. AllowPrivilegeEscalation is true always when + the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN + Note that this field cannot be set when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the container + runtime. Note that this field cannot be set when spec.os.name + is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in privileged + containers are essentially equivalent to root on the host. Defaults + to false. Note that this field cannot be set when spec.os.name + is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount to use for + the containers. The default is DefaultProcMount which uses the + container runtime defaults for readonly paths and masked paths. + This requires the ProcMountType feature flag to be enabled. + Note that this field cannot be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. + Default is false. Note that this field cannot be set when spec.os.name + is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container process. + Uses runtime default if unset. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. Note that this + field cannot be set when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. If true, the Kubelet will validate the image at runtime + to ensure that it does not run as UID 0 (root) and fail to start + the container if it does. If unset or false, no such validation + will be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set when spec.os.name + is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. Note that this + field cannot be set when spec.os.name is windows. + properties: + level: + description: Level is SELinux level label that applies to + the container. + type: string + role: + description: Role is a SELinux role label that applies to + the container. + type: string + type: + description: Type is a SELinux type label that applies to + the container. + type: string + user: + description: User is a SELinux user label that applies to + the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. If + seccomp options are provided at both the pod & container level, + the container options override the pod options. Note that this + field cannot be set when spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must be + preconfigured on the node to work. Must be a descending + path, relative to the kubelet's configured seccomp profile + location. Must only be set if type is "Localhost". + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a profile + defined in a file on the node should be used. RuntimeDefault + - the container runtime default profile should be used. + Unconfined - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all containers. + If unspecified, the options from the PodSecurityContext will + be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named by + the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA + credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. This field is alpha-level + and will only be honored by components that enable the WindowsHostProcessContainers + feature flag. Setting this field without the feature flag + will result in errors when validating the Pod. All of a + Pod's containers must have the same effective HostProcess + value (it is not allowed to have a mix of HostProcess containers + and non-HostProcess containers). In addition, if HostProcess + is true then HostNetwork must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in PodSecurityContext. + If set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. + type: string + type: object + type: object defaultFilterSelector: description: Select cluster filter plugins used to filter for the default cluster output @@ -2243,11 +2403,1562 @@ spec: - debug - trace type: string + mode: + default: collector + description: Mode to determine whether to run Fluentd as collector + or agent. + enum: + - collector + - agent + type: string nodeSelector: additionalProperties: type: string description: NodeSelector type: object + positionDB: + description: Storage for position db. You will use it if tail input + is enabled. Applicable when the mode is "agent", and will be ignored + when the mode is "collector" + properties: + awsElasticBlockStore: + description: 'awsElasticBlockStore represents an AWS Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + partition: + description: 'partition is the partition in the volume that + you want to mount. If omitted, the default is to mount by + volume name. Examples: For volume /dev/sda1, you specify + the partition as "1". Similarly, the volume partition for + /dev/sda is "0" (or you can leave the property empty).' + format: int32 + type: integer + readOnly: + description: 'readOnly value true will force the readOnly + setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'volumeID is unique ID of the persistent disk + resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: azureDisk represents an Azure Data Disk mount on + the host and bind mount to the pod. + properties: + cachingMode: + description: 'cachingMode is the Host Caching mode: None, + Read Only, Read Write.' + type: string + diskName: + description: diskName is the Name of the data disk in the + blob storage + type: string + diskURI: + description: diskURI is the URI of data disk in the blob storage + type: string + fsType: + description: fsType is Filesystem type to mount. Must be a + filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + kind: + description: 'kind expected values are Shared: multiple blob + disks per storage account Dedicated: single blob disk per + storage account Managed: azure managed data disk (only + in managed availability set). defaults to shared' + type: string + readOnly: + description: readOnly Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: azureFile represents an Azure File Service mount + on the host and bind mount to the pod. + properties: + readOnly: + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: secretName is the name of secret that contains + Azure Storage Account Name and Key + type: string + shareName: + description: shareName is the azure share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: cephFS represents a Ceph FS mount on the host that + shares a pod's lifetime + properties: + monitors: + description: 'monitors is Required: Monitors is a collection + of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'path is Optional: Used as the mounted root, + rather than the full Ceph tree, default is /' + type: string + readOnly: + description: 'readOnly is Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'secretFile is Optional: SecretFile is the path + to key ring for User, default is /etc/ceph/user.secret More + info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'secretRef is Optional: SecretRef is reference + to the authentication secret for User, default is empty. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + user: + description: 'user is optional: User is the rados user name, + default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'cinder represents a cinder volume attached and mounted + on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Examples: "ext4", "xfs", "ntfs". Implicitly inferred to + be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. More + info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'secretRef is optional: points to a secret object + containing parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + volumeID: + description: 'volumeID used to identify the volume in cinder. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: configMap represents a configMap that should populate + this volume + properties: + defaultMode: + description: 'defaultMode is optional: mode bits used to set + permissions on created files by default. Must be an octal + value between 0000 and 0777 or a decimal value between 0 + and 511. YAML accepts both octal and decimal values, JSON + requires decimal values for mode bits. Defaults to 0644. + Directories within the path are not affected by this setting. + This might be in conflict with other options that affect + the file mode, like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + items: + description: items if unspecified, each key-value pair in + the Data field of the referenced ConfigMap will be projected + into the volume as a file whose name is the key and content + is the value. If specified, the listed keys will be projected + into the specified paths, and unlisted keys will not be + present. If a key is specified which is not present in the + ConfigMap, the volume setup will error unless it is marked + optional. Paths must be relative and may not contain the + '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits used to set + permissions on this file. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. + YAML accepts both octal and decimal values, JSON requires + decimal values for mode bits. If not specified, the + volume defaultMode will be used. This might be in + conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits + set.' + format: int32 + type: integer + path: + description: path is the relative path of the file to + map the key to. May not be an absolute path. May not + contain the path element '..'. May not start with + the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: optional specify whether the ConfigMap or its + keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + description: csi (Container Storage Interface) represents ephemeral + storage that is handled by certain external CSI drivers (Beta + feature). + properties: + driver: + description: driver is the name of the CSI driver that handles + this volume. Consult with your admin for the correct name + as registered in the cluster. + type: string + fsType: + description: fsType to mount. Ex. "ext4", "xfs", "ntfs". If + not provided, the empty value is passed to the associated + CSI driver which will determine the default filesystem to + apply. + type: string + nodePublishSecretRef: + description: nodePublishSecretRef is a reference to the secret + object containing sensitive information to pass to the CSI + driver to complete the CSI NodePublishVolume and NodeUnpublishVolume + calls. This field is optional, and may be empty if no secret + is required. If the secret object contains more than one + secret, all secret references are passed. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + readOnly: + description: readOnly specifies a read-only configuration + for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: volumeAttributes stores driver-specific properties + that are passed to the CSI driver. Consult your driver's + documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: downwardAPI represents downward API about the pod + that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files + by default. Must be a Optional: mode bits used to set permissions + on created files by default. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires decimal + values for mode bits. Defaults to 0644. Directories within + the path are not affected by this setting. This might be + in conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume file + items: + description: DownwardAPIVolumeFile represents information + to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: + only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + description: 'Optional: mode bits used to set permissions + on this file, must be an octal value between 0000 + and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires + decimal values for mode bits. If not specified, the + volume defaultMode will be used. This might be in + conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits + set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name + of the file to be created. Must not be absolute or + contain the ''..'' path. Must be utf-8 encoded. The + first item of the relative path must not start with + ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'emptyDir represents a temporary directory that shares + a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'medium represents what type of storage medium + should back this directory. The default is "" which means + to use the node''s default medium. Must be an empty string + (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'sizeLimit is the total amount of local storage + required for this EmptyDir volume. The size limit is also + applicable for memory medium. The maximum usage on memory + medium EmptyDir would be the minimum value between the SizeLimit + specified here and the sum of memory limits of all containers + in a pod. The default is nil which means that the limit + is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + description: "ephemeral represents a volume that is handled by + a cluster storage driver. The volume's lifecycle is tied to + the pod that defines it - it will be created before the pod + starts, and deleted when the pod is removed. \n Use this if: + a) the volume is only needed while the pod runs, b) features + of normal volumes like restoring from snapshot or capacity tracking + are needed, c) the storage driver is specified through a storage + class, and d) the storage driver supports dynamic volume provisioning + through a PersistentVolumeClaim (see EphemeralVolumeSource for + more information on the connection between this volume type + and PersistentVolumeClaim). \n Use PersistentVolumeClaim or + one of the vendor-specific APIs for volumes that persist for + longer than the lifecycle of an individual pod. \n Use CSI for + light-weight local ephemeral volumes if the CSI driver is meant + to be used that way - see the documentation of the driver for + more information. \n A pod can use both types of ephemeral volumes + and persistent volumes at the same time." + properties: + volumeClaimTemplate: + description: "Will be used to create a stand-alone PVC to + provision the volume. The pod in which this EphemeralVolumeSource + is embedded will be the owner of the PVC, i.e. the PVC will + be deleted together with the pod. The name of the PVC will + be `-` where `` is the + name from the `PodSpec.Volumes` array entry. Pod validation + will reject the pod if the concatenated name is not valid + for a PVC (for example, too long). \n An existing PVC with + that name that is not owned by the pod will *not* be used + for the pod to avoid using an unrelated volume by mistake. + Starting the pod is then blocked until the unrelated PVC + is removed. If such a pre-created PVC is meant to be used + by the pod, the PVC has to updated with an owner reference + to the pod once the pod exists. Normally this should not + be necessary, but it may be useful when manually reconstructing + a broken cluster. \n This field is read-only and no changes + will be made by Kubernetes to the PVC after it has been + created. \n Required, must not be nil." + properties: + metadata: + description: May contain labels and annotations that will + be copied into the PVC when creating it. No other fields + are allowed and will be rejected during validation. + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: The specification for the PersistentVolumeClaim. + The entire content is copied unchanged into the PVC + that gets created from this template. The same fields + as in a PersistentVolumeClaim are also valid here. + properties: + accessModes: + description: 'accessModes contains the desired access + modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'dataSource field can be used to specify + either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) + * An existing PVC (PersistentVolumeClaim) If the + provisioner or an external controller can support + the specified data source, it will create a new + volume based on the contents of the specified data + source. When the AnyVolumeDataSource feature gate + is enabled, dataSource contents will be copied to + dataSourceRef, and dataSourceRef contents will be + copied to dataSource when dataSourceRef.namespace + is not specified. If the namespace is specified, + then dataSourceRef will not be copied to dataSource.' + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, + the specified Kind must be in the core API group. + For any other third-party types, APIGroup is + required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + description: 'dataSourceRef specifies the object from + which to populate the volume with data, if a non-empty + volume is desired. This may be any object from a + non-empty API group (non core object) or a PersistentVolumeClaim + object. When this field is specified, volume binding + will only succeed if the type of the specified object + matches some installed volume populator or dynamic + provisioner. This field will replace the functionality + of the dataSource field and as such if both fields + are non-empty, they must have the same value. For + backwards compatibility, when namespace isn''t specified + in dataSourceRef, both fields (dataSource and dataSourceRef) + will be set to the same value automatically if one + of them is empty and the other is non-empty. When + namespace is specified in dataSourceRef, dataSource + isn''t set to the same value and must be empty. + There are three important differences between dataSource + and dataSourceRef: * While dataSource only allows + two specific types of objects, dataSourceRef allows + any non-core object, as well as PersistentVolumeClaim + objects. * While dataSource ignores disallowed values + (dropping them), dataSourceRef preserves all values, + and generates an error if a disallowed value is + specified. * While dataSource only allows local + objects, dataSourceRef allows objects in any namespaces. + (Beta) Using this field requires the AnyVolumeDataSource + feature gate to be enabled. (Alpha) Using the namespace + field of dataSourceRef requires the CrossNamespaceVolumeDataSource + feature gate to be enabled.' + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, + the specified Kind must be in the core API group. + For any other third-party types, APIGroup is + required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + namespace: + description: Namespace is the namespace of resource + being referenced Note that when a namespace + is specified, a gateway.networking.k8s.io/ReferenceGrant + object is required in the referent namespace + to allow that namespace's owner to accept the + reference. See the ReferenceGrant documentation + for details. (Alpha) This field requires the + CrossNamespaceVolumeDataSource feature gate + to be enabled. + type: string + required: + - kind + - name + type: object + resources: + description: 'resources represents the minimum resources + the volume should have. If RecoverVolumeExpansionFailure + feature is enabled users are allowed to specify + resource requirements that are lower than previous + value but must still be higher than capacity recorded + in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used + by this container. \n This is an alpha field + and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It + can only be set for containers." + items: + description: ResourceClaim references one entry + in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of + one entry in pod.spec.resourceClaims of + the Pod where this field is used. It makes + that resource available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount + of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount + of compute resources required. If Requests is + omitted for a container, it defaults to Limits + if that is explicitly specified, otherwise to + an implementation-defined value. More info: + https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + selector: + description: selector is a label query over volumes + to consider for binding. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement is + a selector that contains values, a key, and + an operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If + the operator is Exists or DoesNotExist, + the values array must be empty. This array + is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + description: 'storageClassName is the name of the + StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type of volume + is required by the claim. Value of Filesystem is + implied when not included in claim spec. + type: string + volumeName: + description: volumeName is the binding reference to + the PersistentVolume backing this claim. + type: string + type: object + required: + - spec + type: object + type: object + fc: + description: fc represents a Fibre Channel resource that is attached + to a kubelet's host machine and then exposed to the pod. + properties: + fsType: + description: 'fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. TODO: how do we prevent errors in the filesystem + from compromising the machine' + type: string + lun: + description: 'lun is Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'readOnly is Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'targetWWNs is Optional: FC target worldwide + names (WWNs)' + items: + type: string + type: array + wwids: + description: 'wwids Optional: FC volume world wide identifiers + (wwids) Either wwids or combination of targetWWNs and lun + must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: flexVolume represents a generic volume resource that + is provisioned/attached using an exec based plugin. + properties: + driver: + description: driver is the name of the driver to use for this + volume. + type: string + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". The default filesystem depends + on FlexVolume script. + type: string + options: + additionalProperties: + type: string + description: 'options is Optional: this field holds extra + command options if any.' + type: object + readOnly: + description: 'readOnly is Optional: defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'secretRef is Optional: secretRef is reference + to the secret object containing sensitive information to + pass to the plugin scripts. This may be empty if no secret + object is specified. If the secret object contains more + than one secret, all secrets are passed to the plugin scripts.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - driver + type: object + flocker: + description: flocker represents a Flocker volume attached to a + kubelet's host machine. This depends on the Flocker control + service being running + properties: + datasetName: + description: datasetName is Name of the dataset stored as + metadata -> name on the dataset for Flocker should be considered + as deprecated + type: string + datasetUUID: + description: datasetUUID is the UUID of the dataset. This + is unique identifier of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'gcePersistentDisk represents a GCE Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'fsType is filesystem type of the volume that + you want to mount. Tip: Ensure that the filesystem type + is supported by the host operating system. Examples: "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + partition: + description: 'partition is the partition in the volume that + you want to mount. If omitted, the default is to mount by + volume name. Examples: For volume /dev/sda1, you specify + the partition as "1". Similarly, the volume partition for + /dev/sda is "0" (or you can leave the property empty). More + info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'pdName is unique name of the PD resource in + GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'readOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'gitRepo represents a git repository at a particular + revision. DEPRECATED: GitRepo is deprecated. To provision a + container with a git repo, mount an EmptyDir into an InitContainer + that clones the repo using git, then mount the EmptyDir into + the Pod''s container.' + properties: + directory: + description: directory is the target directory name. Must + not contain or start with '..'. If '.' is supplied, the + volume directory will be the git repository. Otherwise, + if specified, the volume will contain the git repository + in the subdirectory with the given name. + type: string + repository: + description: repository is the URL + type: string + revision: + description: revision is the commit hash for the specified + revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'glusterfs represents a Glusterfs mount on the host + that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'endpoints is the endpoint name that details + Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'path is the Glusterfs volume path. More info: + https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'readOnly here will force the Glusterfs volume + to be mounted with read-only permissions. Defaults to false. + More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'hostPath represents a pre-existing file or directory + on the host machine that is directly exposed to the container. + This is generally used for system agents or other privileged + things that are allowed to see the host machine. Most containers + will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + --- TODO(jonesdl) We need to restrict who can use host directory + mounts and who can/can not mount host directories as read/write.' + properties: + path: + description: 'path of the directory on the host. If the path + is a symlink, it will follow the link to the real path. + More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'type for HostPath Volume Defaults to "" More + info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'iscsi represents an ISCSI Disk resource that is + attached to a kubelet''s host machine and then exposed to the + pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: chapAuthDiscovery defines whether support iSCSI + Discovery CHAP authentication + type: boolean + chapAuthSession: + description: chapAuthSession defines whether support iSCSI + Session CHAP authentication + type: boolean + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + initiatorName: + description: initiatorName is the custom iSCSI Initiator Name. + If initiatorName is specified with iscsiInterface simultaneously, + new iSCSI interface : will be + created for the connection. + type: string + iqn: + description: iqn is the target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iscsiInterface is the interface Name that uses + an iSCSI transport. Defaults to 'default' (tcp). + type: string + lun: + description: lun represents iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: portals is the iSCSI Target Portal List. The + portal is either an IP or ip_addr:port if the port is other + than default (typically TCP ports 860 and 3260). + items: + type: string + type: array + readOnly: + description: readOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: secretRef is the CHAP Secret for iSCSI target + and initiator authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + targetPortal: + description: targetPortal is iSCSI Target Portal. The Portal + is either an IP or ip_addr:port if the port is other than + default (typically TCP ports 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + nfs: + description: 'nfs represents an NFS mount on the host that shares + a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'path that is exported by the NFS server. More + info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'readOnly here will force the NFS export to be + mounted with read-only permissions. Defaults to false. More + info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'server is the hostname or IP address of the + NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'persistentVolumeClaimVolumeSource represents a reference + to a PersistentVolumeClaim in the same namespace. More info: + https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'claimName is the name of a PersistentVolumeClaim + in the same namespace as the pod using this volume. More + info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: readOnly Will force the ReadOnly setting in VolumeMounts. + Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: photonPersistentDisk represents a PhotonController + persistent disk attached and mounted on kubelets host machine + properties: + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + pdID: + description: pdID is the ID that identifies Photon Controller + persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: portworxVolume represents a portworx volume attached + and mounted on kubelets host machine + properties: + fsType: + description: fSType represents the filesystem type to mount + Must be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + readOnly: + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: volumeID uniquely identifies a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: projected items for all in one resources secrets, + configmaps, and downward API + properties: + defaultMode: + description: defaultMode are the mode bits used to set permissions + on created files by default. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires decimal + values for mode bits. Directories within the path are not + affected by this setting. This might be in conflict with + other options that affect the file mode, like fsGroup, and + the result can be other mode bits set. + format: int32 + type: integer + sources: + description: sources is the list of volume projections + items: + description: Projection that may be projected along with + other supported volume types + properties: + configMap: + description: configMap information about the configMap + data to project + properties: + items: + description: items if unspecified, each key-value + pair in the Data field of the referenced ConfigMap + will be projected into the volume as a file whose + name is the key and content is the value. If specified, + the listed keys will be projected into the specified + paths, and unlisted keys will not be present. + If a key is specified which is not present in + the ConfigMap, the volume setup will error unless + it is marked optional. Paths must be relative + and may not contain the '..' path or start with + '..'. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits + used to set permissions on this file. Must + be an octal value between 0000 and 0777 + or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON + requires decimal values for mode bits. If + not specified, the volume defaultMode will + be used. This might be in conflict with + other options that affect the file mode, + like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + path: + description: path is the relative path of + the file to map the key to. May not be an + absolute path. May not contain the path + element '..'. May not start with the string + '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: optional specify whether the ConfigMap + or its keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + description: downwardAPI information about the downwardAPI + data to project + properties: + items: + description: Items is a list of DownwardAPIVolume + file + items: + description: DownwardAPIVolumeFile represents + information to create the file containing the + pod field + properties: + fieldRef: + description: 'Required: Selects a field of + the pod: only annotations, labels, name + and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the + FieldPath is written in terms of, defaults + to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + description: 'Optional: mode bits used to + set permissions on this file, must be an + octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both + octal and decimal values, JSON requires + decimal values for mode bits. If not specified, + the volume defaultMode will be used. This + might be in conflict with other options + that affect the file mode, like fsGroup, + and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative + path name of the file to be created. Must + not be absolute or contain the ''..'' path. + Must be utf-8 encoded. The first item of + the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, requests.cpu and requests.memory) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults to + "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + type: object + secret: + description: secret information about the secret data + to project + properties: + items: + description: items if unspecified, each key-value + pair in the Data field of the referenced Secret + will be projected into the volume as a file whose + name is the key and content is the value. If specified, + the listed keys will be projected into the specified + paths, and unlisted keys will not be present. + If a key is specified which is not present in + the Secret, the volume setup will error unless + it is marked optional. Paths must be relative + and may not contain the '..' path or start with + '..'. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits + used to set permissions on this file. Must + be an octal value between 0000 and 0777 + or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON + requires decimal values for mode bits. If + not specified, the volume defaultMode will + be used. This might be in conflict with + other options that affect the file mode, + like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + path: + description: path is the relative path of + the file to map the key to. May not be an + absolute path. May not contain the path + element '..'. May not start with the string + '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: optional field specify whether the + Secret or its key must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + description: serviceAccountToken is information about + the serviceAccountToken data to project + properties: + audience: + description: audience is the intended audience of + the token. A recipient of a token must identify + itself with an identifier specified in the audience + of the token, and otherwise should reject the + token. The audience defaults to the identifier + of the apiserver. + type: string + expirationSeconds: + description: expirationSeconds is the requested + duration of validity of the service account token. + As the token approaches expiration, the kubelet + volume plugin will proactively rotate the service + account token. The kubelet will start trying to + rotate the token if the token is older than 80 + percent of its time to live or if the token is + older than 24 hours.Defaults to 1 hour and must + be at least 10 minutes. + format: int64 + type: integer + path: + description: path is the path relative to the mount + point of the file to project the token into. + type: string + required: + - path + type: object + type: object + type: array + type: object + quobyte: + description: quobyte represents a Quobyte mount on the host that + shares a pod's lifetime + properties: + group: + description: group to map volume access to Default is no group + type: string + readOnly: + description: readOnly here will force the Quobyte volume to + be mounted with read-only permissions. Defaults to false. + type: boolean + registry: + description: registry represents a single or multiple Quobyte + Registry services specified as a string as host:port pair + (multiple entries are separated with commas) which acts + as the central registry for volumes + type: string + tenant: + description: tenant owning the given Quobyte volume in the + Backend Used with dynamically provisioned Quobyte volumes, + value is set by the plugin + type: string + user: + description: user to map volume access to Defaults to serivceaccount + user + type: string + volume: + description: volume is a string that references an already + created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'rbd represents a Rados Block Device mount on the + host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + image: + description: 'image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'keyring is the path to key ring for RBDUser. + Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'monitors is a collection of Ceph monitors. More + info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'pool is the rados pool name. Default is rbd. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'readOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'secretRef is name of the authentication secret + for RBDUser. If provided overrides keyring. Default is nil. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + user: + description: 'user is the rados user name. Default is admin. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: scaleIO represents a ScaleIO persistent volume attached + and mounted on Kubernetes nodes. + properties: + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: gateway is the host address of the ScaleIO API + Gateway. + type: string + protectionDomain: + description: protectionDomain is the name of the ScaleIO Protection + Domain for the configured storage. + type: string + readOnly: + description: readOnly Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: secretRef references to the secret for ScaleIO + user and other sensitive information. If this is not provided, + Login operation will fail. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + sslEnabled: + description: sslEnabled Flag enable/disable SSL communication + with Gateway, default false + type: boolean + storageMode: + description: storageMode indicates whether the storage for + a volume should be ThickProvisioned or ThinProvisioned. + Default is ThinProvisioned. + type: string + storagePool: + description: storagePool is the ScaleIO Storage Pool associated + with the protection domain. + type: string + system: + description: system is the name of the storage system as configured + in ScaleIO. + type: string + volumeName: + description: volumeName is the name of a volume already created + in the ScaleIO system that is associated with this volume + source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'secret represents a secret that should populate + this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'defaultMode is Optional: mode bits used to set + permissions on created files by default. Must be an octal + value between 0000 and 0777 or a decimal value between 0 + and 511. YAML accepts both octal and decimal values, JSON + requires decimal values for mode bits. Defaults to 0644. + Directories within the path are not affected by this setting. + This might be in conflict with other options that affect + the file mode, like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + items: + description: items If unspecified, each key-value pair in + the Data field of the referenced Secret will be projected + into the volume as a file whose name is the key and content + is the value. If specified, the listed keys will be projected + into the specified paths, and unlisted keys will not be + present. If a key is specified which is not present in the + Secret, the volume setup will error unless it is marked + optional. Paths must be relative and may not contain the + '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits used to set + permissions on this file. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. + YAML accepts both octal and decimal values, JSON requires + decimal values for mode bits. If not specified, the + volume defaultMode will be used. This might be in + conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits + set.' + format: int32 + type: integer + path: + description: path is the relative path of the file to + map the key to. May not be an absolute path. May not + contain the path element '..'. May not start with + the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: optional field specify whether the Secret or + its keys must be defined + type: boolean + secretName: + description: 'secretName is the name of the secret in the + pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + type: string + type: object + storageos: + description: storageOS represents a StorageOS volume attached + and mounted on Kubernetes nodes. + properties: + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + readOnly: + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: secretRef specifies the secret to use for obtaining + the StorageOS API credentials. If not specified, default + values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + volumeName: + description: volumeName is the human-readable name of the + StorageOS volume. Volume names are only unique within a + namespace. + type: string + volumeNamespace: + description: volumeNamespace specifies the scope of the volume + within StorageOS. If no namespace is specified then the + Pod's namespace will be used. This allows the Kubernetes + name scoping to be mirrored within StorageOS for tighter + integration. Set VolumeName to any name to override the + default behaviour. Set to "default" if you are not using + namespaces within StorageOS. Namespaces that do not pre-exist + within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: vsphereVolume represents a vSphere volume attached + and mounted on kubelets host machine + properties: + fsType: + description: fsType is filesystem type to mount. Must be a + filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + storagePolicyID: + description: storagePolicyID is the storage Policy Based Management + (SPBM) profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: storagePolicyName is the storage Policy Based + Management (SPBM) profile name. + type: string + volumePath: + description: volumePath is the path that identifies vSphere + volume vmdk + type: string + required: + - volumePath + type: object + type: object priorityClassName: description: PriorityClassName represents the pod's priority class. type: string @@ -2303,7 +4014,8 @@ spec: type: object type: array replicas: - description: Numbers of the Fluentd instance + description: Numbers of the Fluentd instance Applicable when the mode + is "collector", and will be ignored when the mode is "agent" format: int32 type: integer resources: @@ -2597,6 +4309,8 @@ spec: for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. + Applicable when the mode is "collector", and will be ignored when + the mode is "agent" items: description: PersistentVolumeClaim is a user's request for and claim to a persistent volume diff --git a/charts/fluent-operator/templates/fluentd-fluentd.yaml b/charts/fluent-operator/templates/fluentd-fluentd.yaml index 5f5199cb1..29c772018 100644 --- a/charts/fluent-operator/templates/fluentd-fluentd.yaml +++ b/charts/fluent-operator/templates/fluentd-fluentd.yaml @@ -13,6 +13,7 @@ spec: port: {{ .Values.fluentd.port }} replicas: {{ .Values.fluentd.replicas }} image: {{ .Values.fluentd.image.repository }}:{{ .Values.fluentd.image.tag }} + mode: {{ .Values.fluentd.mode }} resources: {{- toYaml .Values.fluentd.resources | nindent 4 }} fluentdCfgSelector: diff --git a/charts/fluent-operator/values.yaml b/charts/fluent-operator/values.yaml index 93244719e..41996c41a 100644 --- a/charts/fluent-operator/values.yaml +++ b/charts/fluent-operator/values.yaml @@ -268,10 +268,16 @@ fluentd: crdsEnable: true enable: false name: fluentd + # Valid modes include "collector" and "agent". + # The "collector" mode will deploy Fluentd as a StatefulSet as before. + # The new "agent" mode will deploy Fluentd as a DaemonSet. + mode: "collector" port: 24224 image: repository: "kubesphere/fluentd" tag: "v1.15.3" + # Numbers of the Fluentd instance + # Applicable when the mode is "collector", and will be ignored when the mode is "agent" replicas: 1 forward: port: 24224 diff --git a/config/crd/bases/fluentd.fluent.io_fluentds.yaml b/config/crd/bases/fluentd.fluent.io_fluentds.yaml index 91728355e..bd48cd838 100644 --- a/config/crd/bases/fluentd.fluent.io_fluentds.yaml +++ b/config/crd/bases/fluentd.fluent.io_fluentds.yaml @@ -1262,6 +1262,166 @@ spec: type: object type: object type: object + containerSecurityContext: + description: ContainerSecurityContext represents the security context + for the fluentd container. + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether a process + can gain more privileges than its parent process. This bool + directly controls if the no_new_privs flag will be set on the + container process. AllowPrivilegeEscalation is true always when + the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN + Note that this field cannot be set when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the container + runtime. Note that this field cannot be set when spec.os.name + is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in privileged + containers are essentially equivalent to root on the host. Defaults + to false. Note that this field cannot be set when spec.os.name + is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount to use for + the containers. The default is DefaultProcMount which uses the + container runtime defaults for readonly paths and masked paths. + This requires the ProcMountType feature flag to be enabled. + Note that this field cannot be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. + Default is false. Note that this field cannot be set when spec.os.name + is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container process. + Uses runtime default if unset. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. Note that this + field cannot be set when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. If true, the Kubelet will validate the image at runtime + to ensure that it does not run as UID 0 (root) and fail to start + the container if it does. If unset or false, no such validation + will be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set when spec.os.name + is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. Note that this + field cannot be set when spec.os.name is windows. + properties: + level: + description: Level is SELinux level label that applies to + the container. + type: string + role: + description: Role is a SELinux role label that applies to + the container. + type: string + type: + description: Type is a SELinux type label that applies to + the container. + type: string + user: + description: User is a SELinux user label that applies to + the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. If + seccomp options are provided at both the pod & container level, + the container options override the pod options. Note that this + field cannot be set when spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must be + preconfigured on the node to work. Must be a descending + path, relative to the kubelet's configured seccomp profile + location. Must only be set if type is "Localhost". + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a profile + defined in a file on the node should be used. RuntimeDefault + - the container runtime default profile should be used. + Unconfined - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all containers. + If unspecified, the options from the PodSecurityContext will + be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named by + the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA + credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. This field is alpha-level + and will only be honored by components that enable the WindowsHostProcessContainers + feature flag. Setting this field without the feature flag + will result in errors when validating the Pod. All of a + Pod's containers must have the same effective HostProcess + value (it is not allowed to have a mix of HostProcess containers + and non-HostProcess containers). In addition, if HostProcess + is true then HostNetwork must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in PodSecurityContext. + If set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. + type: string + type: object + type: object defaultFilterSelector: description: Select cluster filter plugins used to filter for the default cluster output @@ -2243,11 +2403,1562 @@ spec: - debug - trace type: string + mode: + default: collector + description: Mode to determine whether to run Fluentd as collector + or agent. + enum: + - collector + - agent + type: string nodeSelector: additionalProperties: type: string description: NodeSelector type: object + positionDB: + description: Storage for position db. You will use it if tail input + is enabled. Applicable when the mode is "agent", and will be ignored + when the mode is "collector" + properties: + awsElasticBlockStore: + description: 'awsElasticBlockStore represents an AWS Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + partition: + description: 'partition is the partition in the volume that + you want to mount. If omitted, the default is to mount by + volume name. Examples: For volume /dev/sda1, you specify + the partition as "1". Similarly, the volume partition for + /dev/sda is "0" (or you can leave the property empty).' + format: int32 + type: integer + readOnly: + description: 'readOnly value true will force the readOnly + setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'volumeID is unique ID of the persistent disk + resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: azureDisk represents an Azure Data Disk mount on + the host and bind mount to the pod. + properties: + cachingMode: + description: 'cachingMode is the Host Caching mode: None, + Read Only, Read Write.' + type: string + diskName: + description: diskName is the Name of the data disk in the + blob storage + type: string + diskURI: + description: diskURI is the URI of data disk in the blob storage + type: string + fsType: + description: fsType is Filesystem type to mount. Must be a + filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + kind: + description: 'kind expected values are Shared: multiple blob + disks per storage account Dedicated: single blob disk per + storage account Managed: azure managed data disk (only + in managed availability set). defaults to shared' + type: string + readOnly: + description: readOnly Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: azureFile represents an Azure File Service mount + on the host and bind mount to the pod. + properties: + readOnly: + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: secretName is the name of secret that contains + Azure Storage Account Name and Key + type: string + shareName: + description: shareName is the azure share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: cephFS represents a Ceph FS mount on the host that + shares a pod's lifetime + properties: + monitors: + description: 'monitors is Required: Monitors is a collection + of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'path is Optional: Used as the mounted root, + rather than the full Ceph tree, default is /' + type: string + readOnly: + description: 'readOnly is Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'secretFile is Optional: SecretFile is the path + to key ring for User, default is /etc/ceph/user.secret More + info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'secretRef is Optional: SecretRef is reference + to the authentication secret for User, default is empty. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + user: + description: 'user is optional: User is the rados user name, + default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'cinder represents a cinder volume attached and mounted + on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Examples: "ext4", "xfs", "ntfs". Implicitly inferred to + be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. More + info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'secretRef is optional: points to a secret object + containing parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + volumeID: + description: 'volumeID used to identify the volume in cinder. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: configMap represents a configMap that should populate + this volume + properties: + defaultMode: + description: 'defaultMode is optional: mode bits used to set + permissions on created files by default. Must be an octal + value between 0000 and 0777 or a decimal value between 0 + and 511. YAML accepts both octal and decimal values, JSON + requires decimal values for mode bits. Defaults to 0644. + Directories within the path are not affected by this setting. + This might be in conflict with other options that affect + the file mode, like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + items: + description: items if unspecified, each key-value pair in + the Data field of the referenced ConfigMap will be projected + into the volume as a file whose name is the key and content + is the value. If specified, the listed keys will be projected + into the specified paths, and unlisted keys will not be + present. If a key is specified which is not present in the + ConfigMap, the volume setup will error unless it is marked + optional. Paths must be relative and may not contain the + '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits used to set + permissions on this file. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. + YAML accepts both octal and decimal values, JSON requires + decimal values for mode bits. If not specified, the + volume defaultMode will be used. This might be in + conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits + set.' + format: int32 + type: integer + path: + description: path is the relative path of the file to + map the key to. May not be an absolute path. May not + contain the path element '..'. May not start with + the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: optional specify whether the ConfigMap or its + keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + description: csi (Container Storage Interface) represents ephemeral + storage that is handled by certain external CSI drivers (Beta + feature). + properties: + driver: + description: driver is the name of the CSI driver that handles + this volume. Consult with your admin for the correct name + as registered in the cluster. + type: string + fsType: + description: fsType to mount. Ex. "ext4", "xfs", "ntfs". If + not provided, the empty value is passed to the associated + CSI driver which will determine the default filesystem to + apply. + type: string + nodePublishSecretRef: + description: nodePublishSecretRef is a reference to the secret + object containing sensitive information to pass to the CSI + driver to complete the CSI NodePublishVolume and NodeUnpublishVolume + calls. This field is optional, and may be empty if no secret + is required. If the secret object contains more than one + secret, all secret references are passed. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + readOnly: + description: readOnly specifies a read-only configuration + for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: volumeAttributes stores driver-specific properties + that are passed to the CSI driver. Consult your driver's + documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: downwardAPI represents downward API about the pod + that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files + by default. Must be a Optional: mode bits used to set permissions + on created files by default. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires decimal + values for mode bits. Defaults to 0644. Directories within + the path are not affected by this setting. This might be + in conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume file + items: + description: DownwardAPIVolumeFile represents information + to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: + only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + description: 'Optional: mode bits used to set permissions + on this file, must be an octal value between 0000 + and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires + decimal values for mode bits. If not specified, the + volume defaultMode will be used. This might be in + conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits + set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name + of the file to be created. Must not be absolute or + contain the ''..'' path. Must be utf-8 encoded. The + first item of the relative path must not start with + ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'emptyDir represents a temporary directory that shares + a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'medium represents what type of storage medium + should back this directory. The default is "" which means + to use the node''s default medium. Must be an empty string + (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'sizeLimit is the total amount of local storage + required for this EmptyDir volume. The size limit is also + applicable for memory medium. The maximum usage on memory + medium EmptyDir would be the minimum value between the SizeLimit + specified here and the sum of memory limits of all containers + in a pod. The default is nil which means that the limit + is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + description: "ephemeral represents a volume that is handled by + a cluster storage driver. The volume's lifecycle is tied to + the pod that defines it - it will be created before the pod + starts, and deleted when the pod is removed. \n Use this if: + a) the volume is only needed while the pod runs, b) features + of normal volumes like restoring from snapshot or capacity tracking + are needed, c) the storage driver is specified through a storage + class, and d) the storage driver supports dynamic volume provisioning + through a PersistentVolumeClaim (see EphemeralVolumeSource for + more information on the connection between this volume type + and PersistentVolumeClaim). \n Use PersistentVolumeClaim or + one of the vendor-specific APIs for volumes that persist for + longer than the lifecycle of an individual pod. \n Use CSI for + light-weight local ephemeral volumes if the CSI driver is meant + to be used that way - see the documentation of the driver for + more information. \n A pod can use both types of ephemeral volumes + and persistent volumes at the same time." + properties: + volumeClaimTemplate: + description: "Will be used to create a stand-alone PVC to + provision the volume. The pod in which this EphemeralVolumeSource + is embedded will be the owner of the PVC, i.e. the PVC will + be deleted together with the pod. The name of the PVC will + be `-` where `` is the + name from the `PodSpec.Volumes` array entry. Pod validation + will reject the pod if the concatenated name is not valid + for a PVC (for example, too long). \n An existing PVC with + that name that is not owned by the pod will *not* be used + for the pod to avoid using an unrelated volume by mistake. + Starting the pod is then blocked until the unrelated PVC + is removed. If such a pre-created PVC is meant to be used + by the pod, the PVC has to updated with an owner reference + to the pod once the pod exists. Normally this should not + be necessary, but it may be useful when manually reconstructing + a broken cluster. \n This field is read-only and no changes + will be made by Kubernetes to the PVC after it has been + created. \n Required, must not be nil." + properties: + metadata: + description: May contain labels and annotations that will + be copied into the PVC when creating it. No other fields + are allowed and will be rejected during validation. + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: The specification for the PersistentVolumeClaim. + The entire content is copied unchanged into the PVC + that gets created from this template. The same fields + as in a PersistentVolumeClaim are also valid here. + properties: + accessModes: + description: 'accessModes contains the desired access + modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'dataSource field can be used to specify + either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) + * An existing PVC (PersistentVolumeClaim) If the + provisioner or an external controller can support + the specified data source, it will create a new + volume based on the contents of the specified data + source. When the AnyVolumeDataSource feature gate + is enabled, dataSource contents will be copied to + dataSourceRef, and dataSourceRef contents will be + copied to dataSource when dataSourceRef.namespace + is not specified. If the namespace is specified, + then dataSourceRef will not be copied to dataSource.' + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, + the specified Kind must be in the core API group. + For any other third-party types, APIGroup is + required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + description: 'dataSourceRef specifies the object from + which to populate the volume with data, if a non-empty + volume is desired. This may be any object from a + non-empty API group (non core object) or a PersistentVolumeClaim + object. When this field is specified, volume binding + will only succeed if the type of the specified object + matches some installed volume populator or dynamic + provisioner. This field will replace the functionality + of the dataSource field and as such if both fields + are non-empty, they must have the same value. For + backwards compatibility, when namespace isn''t specified + in dataSourceRef, both fields (dataSource and dataSourceRef) + will be set to the same value automatically if one + of them is empty and the other is non-empty. When + namespace is specified in dataSourceRef, dataSource + isn''t set to the same value and must be empty. + There are three important differences between dataSource + and dataSourceRef: * While dataSource only allows + two specific types of objects, dataSourceRef allows + any non-core object, as well as PersistentVolumeClaim + objects. * While dataSource ignores disallowed values + (dropping them), dataSourceRef preserves all values, + and generates an error if a disallowed value is + specified. * While dataSource only allows local + objects, dataSourceRef allows objects in any namespaces. + (Beta) Using this field requires the AnyVolumeDataSource + feature gate to be enabled. (Alpha) Using the namespace + field of dataSourceRef requires the CrossNamespaceVolumeDataSource + feature gate to be enabled.' + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, + the specified Kind must be in the core API group. + For any other third-party types, APIGroup is + required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + namespace: + description: Namespace is the namespace of resource + being referenced Note that when a namespace + is specified, a gateway.networking.k8s.io/ReferenceGrant + object is required in the referent namespace + to allow that namespace's owner to accept the + reference. See the ReferenceGrant documentation + for details. (Alpha) This field requires the + CrossNamespaceVolumeDataSource feature gate + to be enabled. + type: string + required: + - kind + - name + type: object + resources: + description: 'resources represents the minimum resources + the volume should have. If RecoverVolumeExpansionFailure + feature is enabled users are allowed to specify + resource requirements that are lower than previous + value but must still be higher than capacity recorded + in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used + by this container. \n This is an alpha field + and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It + can only be set for containers." + items: + description: ResourceClaim references one entry + in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of + one entry in pod.spec.resourceClaims of + the Pod where this field is used. It makes + that resource available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount + of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount + of compute resources required. If Requests is + omitted for a container, it defaults to Limits + if that is explicitly specified, otherwise to + an implementation-defined value. More info: + https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + selector: + description: selector is a label query over volumes + to consider for binding. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement is + a selector that contains values, a key, and + an operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If + the operator is Exists or DoesNotExist, + the values array must be empty. This array + is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + description: 'storageClassName is the name of the + StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type of volume + is required by the claim. Value of Filesystem is + implied when not included in claim spec. + type: string + volumeName: + description: volumeName is the binding reference to + the PersistentVolume backing this claim. + type: string + type: object + required: + - spec + type: object + type: object + fc: + description: fc represents a Fibre Channel resource that is attached + to a kubelet's host machine and then exposed to the pod. + properties: + fsType: + description: 'fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. TODO: how do we prevent errors in the filesystem + from compromising the machine' + type: string + lun: + description: 'lun is Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'readOnly is Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'targetWWNs is Optional: FC target worldwide + names (WWNs)' + items: + type: string + type: array + wwids: + description: 'wwids Optional: FC volume world wide identifiers + (wwids) Either wwids or combination of targetWWNs and lun + must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: flexVolume represents a generic volume resource that + is provisioned/attached using an exec based plugin. + properties: + driver: + description: driver is the name of the driver to use for this + volume. + type: string + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". The default filesystem depends + on FlexVolume script. + type: string + options: + additionalProperties: + type: string + description: 'options is Optional: this field holds extra + command options if any.' + type: object + readOnly: + description: 'readOnly is Optional: defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'secretRef is Optional: secretRef is reference + to the secret object containing sensitive information to + pass to the plugin scripts. This may be empty if no secret + object is specified. If the secret object contains more + than one secret, all secrets are passed to the plugin scripts.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - driver + type: object + flocker: + description: flocker represents a Flocker volume attached to a + kubelet's host machine. This depends on the Flocker control + service being running + properties: + datasetName: + description: datasetName is Name of the dataset stored as + metadata -> name on the dataset for Flocker should be considered + as deprecated + type: string + datasetUUID: + description: datasetUUID is the UUID of the dataset. This + is unique identifier of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'gcePersistentDisk represents a GCE Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'fsType is filesystem type of the volume that + you want to mount. Tip: Ensure that the filesystem type + is supported by the host operating system. Examples: "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + partition: + description: 'partition is the partition in the volume that + you want to mount. If omitted, the default is to mount by + volume name. Examples: For volume /dev/sda1, you specify + the partition as "1". Similarly, the volume partition for + /dev/sda is "0" (or you can leave the property empty). More + info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'pdName is unique name of the PD resource in + GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'readOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'gitRepo represents a git repository at a particular + revision. DEPRECATED: GitRepo is deprecated. To provision a + container with a git repo, mount an EmptyDir into an InitContainer + that clones the repo using git, then mount the EmptyDir into + the Pod''s container.' + properties: + directory: + description: directory is the target directory name. Must + not contain or start with '..'. If '.' is supplied, the + volume directory will be the git repository. Otherwise, + if specified, the volume will contain the git repository + in the subdirectory with the given name. + type: string + repository: + description: repository is the URL + type: string + revision: + description: revision is the commit hash for the specified + revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'glusterfs represents a Glusterfs mount on the host + that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'endpoints is the endpoint name that details + Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'path is the Glusterfs volume path. More info: + https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'readOnly here will force the Glusterfs volume + to be mounted with read-only permissions. Defaults to false. + More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'hostPath represents a pre-existing file or directory + on the host machine that is directly exposed to the container. + This is generally used for system agents or other privileged + things that are allowed to see the host machine. Most containers + will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + --- TODO(jonesdl) We need to restrict who can use host directory + mounts and who can/can not mount host directories as read/write.' + properties: + path: + description: 'path of the directory on the host. If the path + is a symlink, it will follow the link to the real path. + More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'type for HostPath Volume Defaults to "" More + info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'iscsi represents an ISCSI Disk resource that is + attached to a kubelet''s host machine and then exposed to the + pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: chapAuthDiscovery defines whether support iSCSI + Discovery CHAP authentication + type: boolean + chapAuthSession: + description: chapAuthSession defines whether support iSCSI + Session CHAP authentication + type: boolean + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + initiatorName: + description: initiatorName is the custom iSCSI Initiator Name. + If initiatorName is specified with iscsiInterface simultaneously, + new iSCSI interface : will be + created for the connection. + type: string + iqn: + description: iqn is the target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iscsiInterface is the interface Name that uses + an iSCSI transport. Defaults to 'default' (tcp). + type: string + lun: + description: lun represents iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: portals is the iSCSI Target Portal List. The + portal is either an IP or ip_addr:port if the port is other + than default (typically TCP ports 860 and 3260). + items: + type: string + type: array + readOnly: + description: readOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: secretRef is the CHAP Secret for iSCSI target + and initiator authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + targetPortal: + description: targetPortal is iSCSI Target Portal. The Portal + is either an IP or ip_addr:port if the port is other than + default (typically TCP ports 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + nfs: + description: 'nfs represents an NFS mount on the host that shares + a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'path that is exported by the NFS server. More + info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'readOnly here will force the NFS export to be + mounted with read-only permissions. Defaults to false. More + info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'server is the hostname or IP address of the + NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'persistentVolumeClaimVolumeSource represents a reference + to a PersistentVolumeClaim in the same namespace. More info: + https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'claimName is the name of a PersistentVolumeClaim + in the same namespace as the pod using this volume. More + info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: readOnly Will force the ReadOnly setting in VolumeMounts. + Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: photonPersistentDisk represents a PhotonController + persistent disk attached and mounted on kubelets host machine + properties: + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + pdID: + description: pdID is the ID that identifies Photon Controller + persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: portworxVolume represents a portworx volume attached + and mounted on kubelets host machine + properties: + fsType: + description: fSType represents the filesystem type to mount + Must be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + readOnly: + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: volumeID uniquely identifies a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: projected items for all in one resources secrets, + configmaps, and downward API + properties: + defaultMode: + description: defaultMode are the mode bits used to set permissions + on created files by default. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires decimal + values for mode bits. Directories within the path are not + affected by this setting. This might be in conflict with + other options that affect the file mode, like fsGroup, and + the result can be other mode bits set. + format: int32 + type: integer + sources: + description: sources is the list of volume projections + items: + description: Projection that may be projected along with + other supported volume types + properties: + configMap: + description: configMap information about the configMap + data to project + properties: + items: + description: items if unspecified, each key-value + pair in the Data field of the referenced ConfigMap + will be projected into the volume as a file whose + name is the key and content is the value. If specified, + the listed keys will be projected into the specified + paths, and unlisted keys will not be present. + If a key is specified which is not present in + the ConfigMap, the volume setup will error unless + it is marked optional. Paths must be relative + and may not contain the '..' path or start with + '..'. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits + used to set permissions on this file. Must + be an octal value between 0000 and 0777 + or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON + requires decimal values for mode bits. If + not specified, the volume defaultMode will + be used. This might be in conflict with + other options that affect the file mode, + like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + path: + description: path is the relative path of + the file to map the key to. May not be an + absolute path. May not contain the path + element '..'. May not start with the string + '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: optional specify whether the ConfigMap + or its keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + description: downwardAPI information about the downwardAPI + data to project + properties: + items: + description: Items is a list of DownwardAPIVolume + file + items: + description: DownwardAPIVolumeFile represents + information to create the file containing the + pod field + properties: + fieldRef: + description: 'Required: Selects a field of + the pod: only annotations, labels, name + and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the + FieldPath is written in terms of, defaults + to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + description: 'Optional: mode bits used to + set permissions on this file, must be an + octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both + octal and decimal values, JSON requires + decimal values for mode bits. If not specified, + the volume defaultMode will be used. This + might be in conflict with other options + that affect the file mode, like fsGroup, + and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative + path name of the file to be created. Must + not be absolute or contain the ''..'' path. + Must be utf-8 encoded. The first item of + the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, requests.cpu and requests.memory) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults to + "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + type: object + secret: + description: secret information about the secret data + to project + properties: + items: + description: items if unspecified, each key-value + pair in the Data field of the referenced Secret + will be projected into the volume as a file whose + name is the key and content is the value. If specified, + the listed keys will be projected into the specified + paths, and unlisted keys will not be present. + If a key is specified which is not present in + the Secret, the volume setup will error unless + it is marked optional. Paths must be relative + and may not contain the '..' path or start with + '..'. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits + used to set permissions on this file. Must + be an octal value between 0000 and 0777 + or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON + requires decimal values for mode bits. If + not specified, the volume defaultMode will + be used. This might be in conflict with + other options that affect the file mode, + like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + path: + description: path is the relative path of + the file to map the key to. May not be an + absolute path. May not contain the path + element '..'. May not start with the string + '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: optional field specify whether the + Secret or its key must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + description: serviceAccountToken is information about + the serviceAccountToken data to project + properties: + audience: + description: audience is the intended audience of + the token. A recipient of a token must identify + itself with an identifier specified in the audience + of the token, and otherwise should reject the + token. The audience defaults to the identifier + of the apiserver. + type: string + expirationSeconds: + description: expirationSeconds is the requested + duration of validity of the service account token. + As the token approaches expiration, the kubelet + volume plugin will proactively rotate the service + account token. The kubelet will start trying to + rotate the token if the token is older than 80 + percent of its time to live or if the token is + older than 24 hours.Defaults to 1 hour and must + be at least 10 minutes. + format: int64 + type: integer + path: + description: path is the path relative to the mount + point of the file to project the token into. + type: string + required: + - path + type: object + type: object + type: array + type: object + quobyte: + description: quobyte represents a Quobyte mount on the host that + shares a pod's lifetime + properties: + group: + description: group to map volume access to Default is no group + type: string + readOnly: + description: readOnly here will force the Quobyte volume to + be mounted with read-only permissions. Defaults to false. + type: boolean + registry: + description: registry represents a single or multiple Quobyte + Registry services specified as a string as host:port pair + (multiple entries are separated with commas) which acts + as the central registry for volumes + type: string + tenant: + description: tenant owning the given Quobyte volume in the + Backend Used with dynamically provisioned Quobyte volumes, + value is set by the plugin + type: string + user: + description: user to map volume access to Defaults to serivceaccount + user + type: string + volume: + description: volume is a string that references an already + created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'rbd represents a Rados Block Device mount on the + host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + image: + description: 'image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'keyring is the path to key ring for RBDUser. + Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'monitors is a collection of Ceph monitors. More + info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'pool is the rados pool name. Default is rbd. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'readOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'secretRef is name of the authentication secret + for RBDUser. If provided overrides keyring. Default is nil. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + user: + description: 'user is the rados user name. Default is admin. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: scaleIO represents a ScaleIO persistent volume attached + and mounted on Kubernetes nodes. + properties: + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: gateway is the host address of the ScaleIO API + Gateway. + type: string + protectionDomain: + description: protectionDomain is the name of the ScaleIO Protection + Domain for the configured storage. + type: string + readOnly: + description: readOnly Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: secretRef references to the secret for ScaleIO + user and other sensitive information. If this is not provided, + Login operation will fail. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + sslEnabled: + description: sslEnabled Flag enable/disable SSL communication + with Gateway, default false + type: boolean + storageMode: + description: storageMode indicates whether the storage for + a volume should be ThickProvisioned or ThinProvisioned. + Default is ThinProvisioned. + type: string + storagePool: + description: storagePool is the ScaleIO Storage Pool associated + with the protection domain. + type: string + system: + description: system is the name of the storage system as configured + in ScaleIO. + type: string + volumeName: + description: volumeName is the name of a volume already created + in the ScaleIO system that is associated with this volume + source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'secret represents a secret that should populate + this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'defaultMode is Optional: mode bits used to set + permissions on created files by default. Must be an octal + value between 0000 and 0777 or a decimal value between 0 + and 511. YAML accepts both octal and decimal values, JSON + requires decimal values for mode bits. Defaults to 0644. + Directories within the path are not affected by this setting. + This might be in conflict with other options that affect + the file mode, like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + items: + description: items If unspecified, each key-value pair in + the Data field of the referenced Secret will be projected + into the volume as a file whose name is the key and content + is the value. If specified, the listed keys will be projected + into the specified paths, and unlisted keys will not be + present. If a key is specified which is not present in the + Secret, the volume setup will error unless it is marked + optional. Paths must be relative and may not contain the + '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits used to set + permissions on this file. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. + YAML accepts both octal and decimal values, JSON requires + decimal values for mode bits. If not specified, the + volume defaultMode will be used. This might be in + conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits + set.' + format: int32 + type: integer + path: + description: path is the relative path of the file to + map the key to. May not be an absolute path. May not + contain the path element '..'. May not start with + the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: optional field specify whether the Secret or + its keys must be defined + type: boolean + secretName: + description: 'secretName is the name of the secret in the + pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + type: string + type: object + storageos: + description: storageOS represents a StorageOS volume attached + and mounted on Kubernetes nodes. + properties: + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + readOnly: + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: secretRef specifies the secret to use for obtaining + the StorageOS API credentials. If not specified, default + values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + volumeName: + description: volumeName is the human-readable name of the + StorageOS volume. Volume names are only unique within a + namespace. + type: string + volumeNamespace: + description: volumeNamespace specifies the scope of the volume + within StorageOS. If no namespace is specified then the + Pod's namespace will be used. This allows the Kubernetes + name scoping to be mirrored within StorageOS for tighter + integration. Set VolumeName to any name to override the + default behaviour. Set to "default" if you are not using + namespaces within StorageOS. Namespaces that do not pre-exist + within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: vsphereVolume represents a vSphere volume attached + and mounted on kubelets host machine + properties: + fsType: + description: fsType is filesystem type to mount. Must be a + filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + storagePolicyID: + description: storagePolicyID is the storage Policy Based Management + (SPBM) profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: storagePolicyName is the storage Policy Based + Management (SPBM) profile name. + type: string + volumePath: + description: volumePath is the path that identifies vSphere + volume vmdk + type: string + required: + - volumePath + type: object + type: object priorityClassName: description: PriorityClassName represents the pod's priority class. type: string @@ -2303,7 +4014,8 @@ spec: type: object type: array replicas: - description: Numbers of the Fluentd instance + description: Numbers of the Fluentd instance Applicable when the mode + is "collector", and will be ignored when the mode is "agent" format: int32 type: integer resources: @@ -2597,6 +4309,8 @@ spec: for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. + Applicable when the mode is "collector", and will be ignored when + the mode is "agent" items: description: PersistentVolumeClaim is a user's request for and claim to a persistent volume diff --git a/controllers/consts.go b/controllers/consts.go index d5aa268ff..3561a046e 100644 --- a/controllers/consts.go +++ b/controllers/consts.go @@ -11,4 +11,5 @@ var ( fluentdOwnerKey = ".fluentd.metadata.controller" fluentbitApiGVStr = fluentbitv1alpha2.SchemeGroupVersion.String() fluentdApiGVStr = fluentdv1alpha1.SchemeGroupVersion.String() + fluentdAgentMode = "agent" ) diff --git a/controllers/fluent_controller_finalizer.go b/controllers/fluent_controller_finalizer.go index f0ac6c84c..0844d4dc0 100644 --- a/controllers/fluent_controller_finalizer.go +++ b/controllers/fluent_controller_finalizer.go @@ -87,6 +87,16 @@ func (r *FluentdReconciler) delete(ctx context.Context, fd *fluentdv1alpha1.Flue return err } + ds := appsv1.DaemonSet{ + ObjectMeta: metav1.ObjectMeta{ + Name: fd.Name, + Namespace: fd.Namespace, + }, + } + if err := r.Delete(ctx, &ds); err != nil && !errors.IsNotFound(err) { + return err + } + svc := corev1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: fd.Name, @@ -129,8 +139,18 @@ func (r *FluentdReconciler) mutate(obj client.Object, fd *fluentdv1alpha1.Fluent return nil } case *appsv1.StatefulSet: - expected := operator.MakeStatefulset(*fd) + expected := operator.MakeStatefulSet(*fd) + return func() error { + o.Labels = expected.Labels + o.Spec = expected.Spec + if err := ctrl.SetControllerReference(fd, o, r.Scheme); err != nil { + return err + } + return nil + } + case *appsv1.DaemonSet: + expected := operator.MakeFluentdDaemonSet(*fd) return func() error { o.Labels = expected.Labels o.Spec = expected.Spec diff --git a/controllers/fluentd_controller.go b/controllers/fluentd_controller.go index fada5638c..e2ef014d9 100644 --- a/controllers/fluentd_controller.go +++ b/controllers/fluentd_controller.go @@ -105,17 +105,44 @@ func (r *FluentdReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct return ctrl.Result{}, err } - // Deploy Fluentd Statefulset - sts := operator.MakeStatefulset(fd) - if _, err := controllerutil.CreateOrPatch(ctx, r.Client, sts, r.mutate(sts, &fd)); err != nil { - return ctrl.Result{}, err + var err error + if fd.Spec.Mode == "agent" { + // Deploy Fluentd DaemonSet + ds := operator.MakeFluentdDaemonSet(fd) + _, err = controllerutil.CreateOrPatch(ctx, r.Client, ds, r.mutate(ds, &fd)) + if err != nil { + return ctrl.Result{}, err + } + sts := appsv1.StatefulSet{ + ObjectMeta: metav1.ObjectMeta{ + Name: fd.Name, + Namespace: fd.Namespace, + }, + } + if err = r.Delete(ctx, &sts); err != nil && !errors.IsNotFound(err) { + return ctrl.Result{}, err + } + } else { + // Deploy Fluentd StatefulSet + sts := operator.MakeStatefulSet(fd) + _, err = controllerutil.CreateOrPatch(ctx, r.Client, sts, r.mutate(sts, &fd)) + ds := appsv1.DaemonSet{ + ObjectMeta: metav1.ObjectMeta{ + Name: fd.Name, + Namespace: fd.Namespace, + }, + } + if err = r.Delete(ctx, &ds); err != nil && !errors.IsNotFound(err) { + return ctrl.Result{}, err + } } - // Deploy Fluentd Service if !fd.Spec.DisableService { svc := operator.MakeFluentdService(fd) - if _, err := controllerutil.CreateOrPatch(ctx, r.Client, svc, r.mutate(svc, &fd)); err != nil { - return ctrl.Result{}, err + if len(svc.Spec.Ports) > 0 { + if _, err = controllerutil.CreateOrPatch(ctx, r.Client, svc, r.mutate(svc, &fd)); err != nil { + return ctrl.Result{}, err + } } } @@ -139,6 +166,22 @@ func (r *FluentdReconciler) SetupWithManager(mgr ctrl.Manager) error { return err } + if err := mgr.GetFieldIndexer().IndexField(context.Background(), &appsv1.DaemonSet{}, fluentdOwnerKey, func(rawObj client.Object) []string { + // grab the job object, extract the owner. + ds := rawObj.(*appsv1.DaemonSet) + owner := metav1.GetControllerOf(ds) + if owner == nil { + return nil + } + + if owner.APIVersion != fluentdApiGVStr || owner.Kind != "Fluentd" { + return nil + } + return []string{owner.Name} + }); err != nil { + return err + } + if err := mgr.GetFieldIndexer().IndexField(context.Background(), &appsv1.StatefulSet{}, fluentdOwnerKey, func(rawObj client.Object) []string { // grab the job object, extract the owner. sts := rawObj.(*appsv1.StatefulSet) @@ -174,6 +217,7 @@ func (r *FluentdReconciler) SetupWithManager(mgr ctrl.Manager) error { return ctrl.NewControllerManagedBy(mgr). For(&fluentdv1alpha1.Fluentd{}). Owns(&corev1.ServiceAccount{}). + Owns(&appsv1.DaemonSet{}). Owns(&appsv1.StatefulSet{}). Owns(&corev1.Service{}). Complete(r) diff --git a/go.mod b/go.mod index d1ce8e4bb..c7c35c777 100644 --- a/go.mod +++ b/go.mod @@ -58,12 +58,14 @@ require ( go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.7.0 // indirect go.uber.org/zap v1.24.0 // indirect + golang.org/x/mod v0.10.0 // indirect golang.org/x/net v0.10.0 // indirect golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect golang.org/x/sys v0.8.0 // indirect golang.org/x/term v0.8.0 // indirect golang.org/x/text v0.9.0 // indirect golang.org/x/time v0.3.0 // indirect + golang.org/x/tools v0.9.1 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.28.1 // indirect @@ -72,7 +74,9 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.26.1 // indirect + k8s.io/code-generator v0.26.1 // indirect k8s.io/component-base v0.26.1 // indirect + k8s.io/gengo v0.0.0-20220902162205-c0856e24416d // indirect k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect diff --git a/go.sum b/go.sum index 641313c9a..eedf76a5f 100644 --- a/go.sum +++ b/go.sum @@ -89,6 +89,7 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= @@ -349,6 +350,8 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= +golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -503,6 +506,7 @@ golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjs golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -513,6 +517,7 @@ golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= +golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -640,8 +645,13 @@ k8s.io/apimachinery v0.27.3 h1:Ubye8oBufD04l9QnNtW05idcOe9Z3GQN8+7PqmuVcUM= k8s.io/apimachinery v0.27.3/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= k8s.io/client-go v0.26.3 h1:k1UY+KXfkxV2ScEL3gilKcF7761xkYsSD6BC9szIu8s= k8s.io/client-go v0.26.3/go.mod h1:ZPNu9lm8/dbRIPAgteN30RSXea6vrCpFvq+MateTUuQ= +k8s.io/code-generator v0.26.1 h1:dusFDsnNSKlMFYhzIM0jAO1OlnTN5WYwQQ+Ai12IIlo= +k8s.io/code-generator v0.26.1/go.mod h1:OMoJ5Dqx1wgaQzKgc+ZWaZPfGjdRq/Y3WubFrZmeI3I= k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= +k8s.io/gengo v0.0.0-20220902162205-c0856e24416d h1:U9tB195lKdzwqicbJvyJeOXV7Klv+wNAWENRnXEGi08= +k8s.io/gengo v0.0.0-20220902162205-c0856e24416d/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= @@ -657,5 +667,6 @@ sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMm sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/manifests/setup/fluent-operator-crd.yaml b/manifests/setup/fluent-operator-crd.yaml index 552aae100..a4f59cc1d 100644 --- a/manifests/setup/fluent-operator-crd.yaml +++ b/manifests/setup/fluent-operator-crd.yaml @@ -19414,6 +19414,166 @@ spec: type: object type: object type: object + containerSecurityContext: + description: ContainerSecurityContext represents the security context + for the fluentd container. + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether a process + can gain more privileges than its parent process. This bool + directly controls if the no_new_privs flag will be set on the + container process. AllowPrivilegeEscalation is true always when + the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN + Note that this field cannot be set when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the container + runtime. Note that this field cannot be set when spec.os.name + is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in privileged + containers are essentially equivalent to root on the host. Defaults + to false. Note that this field cannot be set when spec.os.name + is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount to use for + the containers. The default is DefaultProcMount which uses the + container runtime defaults for readonly paths and masked paths. + This requires the ProcMountType feature flag to be enabled. + Note that this field cannot be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. + Default is false. Note that this field cannot be set when spec.os.name + is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container process. + Uses runtime default if unset. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. Note that this + field cannot be set when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. If true, the Kubelet will validate the image at runtime + to ensure that it does not run as UID 0 (root) and fail to start + the container if it does. If unset or false, no such validation + will be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set when spec.os.name + is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. Note that this + field cannot be set when spec.os.name is windows. + properties: + level: + description: Level is SELinux level label that applies to + the container. + type: string + role: + description: Role is a SELinux role label that applies to + the container. + type: string + type: + description: Type is a SELinux type label that applies to + the container. + type: string + user: + description: User is a SELinux user label that applies to + the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. If + seccomp options are provided at both the pod & container level, + the container options override the pod options. Note that this + field cannot be set when spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must be + preconfigured on the node to work. Must be a descending + path, relative to the kubelet's configured seccomp profile + location. Must only be set if type is "Localhost". + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a profile + defined in a file on the node should be used. RuntimeDefault + - the container runtime default profile should be used. + Unconfined - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all containers. + If unspecified, the options from the PodSecurityContext will + be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named by + the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA + credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. This field is alpha-level + and will only be honored by components that enable the WindowsHostProcessContainers + feature flag. Setting this field without the feature flag + will result in errors when validating the Pod. All of a + Pod's containers must have the same effective HostProcess + value (it is not allowed to have a mix of HostProcess containers + and non-HostProcess containers). In addition, if HostProcess + is true then HostNetwork must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in PodSecurityContext. + If set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. + type: string + type: object + type: object defaultFilterSelector: description: Select cluster filter plugins used to filter for the default cluster output @@ -20395,11 +20555,1562 @@ spec: - debug - trace type: string + mode: + default: collector + description: Mode to determine whether to run Fluentd as collector + or agent. + enum: + - collector + - agent + type: string nodeSelector: additionalProperties: type: string description: NodeSelector type: object + positionDB: + description: Storage for position db. You will use it if tail input + is enabled. Applicable when the mode is "agent", and will be ignored + when the mode is "collector" + properties: + awsElasticBlockStore: + description: 'awsElasticBlockStore represents an AWS Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + partition: + description: 'partition is the partition in the volume that + you want to mount. If omitted, the default is to mount by + volume name. Examples: For volume /dev/sda1, you specify + the partition as "1". Similarly, the volume partition for + /dev/sda is "0" (or you can leave the property empty).' + format: int32 + type: integer + readOnly: + description: 'readOnly value true will force the readOnly + setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'volumeID is unique ID of the persistent disk + resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: azureDisk represents an Azure Data Disk mount on + the host and bind mount to the pod. + properties: + cachingMode: + description: 'cachingMode is the Host Caching mode: None, + Read Only, Read Write.' + type: string + diskName: + description: diskName is the Name of the data disk in the + blob storage + type: string + diskURI: + description: diskURI is the URI of data disk in the blob storage + type: string + fsType: + description: fsType is Filesystem type to mount. Must be a + filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + kind: + description: 'kind expected values are Shared: multiple blob + disks per storage account Dedicated: single blob disk per + storage account Managed: azure managed data disk (only + in managed availability set). defaults to shared' + type: string + readOnly: + description: readOnly Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: azureFile represents an Azure File Service mount + on the host and bind mount to the pod. + properties: + readOnly: + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: secretName is the name of secret that contains + Azure Storage Account Name and Key + type: string + shareName: + description: shareName is the azure share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: cephFS represents a Ceph FS mount on the host that + shares a pod's lifetime + properties: + monitors: + description: 'monitors is Required: Monitors is a collection + of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'path is Optional: Used as the mounted root, + rather than the full Ceph tree, default is /' + type: string + readOnly: + description: 'readOnly is Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'secretFile is Optional: SecretFile is the path + to key ring for User, default is /etc/ceph/user.secret More + info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'secretRef is Optional: SecretRef is reference + to the authentication secret for User, default is empty. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + user: + description: 'user is optional: User is the rados user name, + default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'cinder represents a cinder volume attached and mounted + on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Examples: "ext4", "xfs", "ntfs". Implicitly inferred to + be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. More + info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'secretRef is optional: points to a secret object + containing parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + volumeID: + description: 'volumeID used to identify the volume in cinder. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: configMap represents a configMap that should populate + this volume + properties: + defaultMode: + description: 'defaultMode is optional: mode bits used to set + permissions on created files by default. Must be an octal + value between 0000 and 0777 or a decimal value between 0 + and 511. YAML accepts both octal and decimal values, JSON + requires decimal values for mode bits. Defaults to 0644. + Directories within the path are not affected by this setting. + This might be in conflict with other options that affect + the file mode, like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + items: + description: items if unspecified, each key-value pair in + the Data field of the referenced ConfigMap will be projected + into the volume as a file whose name is the key and content + is the value. If specified, the listed keys will be projected + into the specified paths, and unlisted keys will not be + present. If a key is specified which is not present in the + ConfigMap, the volume setup will error unless it is marked + optional. Paths must be relative and may not contain the + '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits used to set + permissions on this file. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. + YAML accepts both octal and decimal values, JSON requires + decimal values for mode bits. If not specified, the + volume defaultMode will be used. This might be in + conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits + set.' + format: int32 + type: integer + path: + description: path is the relative path of the file to + map the key to. May not be an absolute path. May not + contain the path element '..'. May not start with + the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: optional specify whether the ConfigMap or its + keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + description: csi (Container Storage Interface) represents ephemeral + storage that is handled by certain external CSI drivers (Beta + feature). + properties: + driver: + description: driver is the name of the CSI driver that handles + this volume. Consult with your admin for the correct name + as registered in the cluster. + type: string + fsType: + description: fsType to mount. Ex. "ext4", "xfs", "ntfs". If + not provided, the empty value is passed to the associated + CSI driver which will determine the default filesystem to + apply. + type: string + nodePublishSecretRef: + description: nodePublishSecretRef is a reference to the secret + object containing sensitive information to pass to the CSI + driver to complete the CSI NodePublishVolume and NodeUnpublishVolume + calls. This field is optional, and may be empty if no secret + is required. If the secret object contains more than one + secret, all secret references are passed. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + readOnly: + description: readOnly specifies a read-only configuration + for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: volumeAttributes stores driver-specific properties + that are passed to the CSI driver. Consult your driver's + documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: downwardAPI represents downward API about the pod + that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files + by default. Must be a Optional: mode bits used to set permissions + on created files by default. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires decimal + values for mode bits. Defaults to 0644. Directories within + the path are not affected by this setting. This might be + in conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume file + items: + description: DownwardAPIVolumeFile represents information + to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: + only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + description: 'Optional: mode bits used to set permissions + on this file, must be an octal value between 0000 + and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires + decimal values for mode bits. If not specified, the + volume defaultMode will be used. This might be in + conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits + set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name + of the file to be created. Must not be absolute or + contain the ''..'' path. Must be utf-8 encoded. The + first item of the relative path must not start with + ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'emptyDir represents a temporary directory that shares + a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'medium represents what type of storage medium + should back this directory. The default is "" which means + to use the node''s default medium. Must be an empty string + (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'sizeLimit is the total amount of local storage + required for this EmptyDir volume. The size limit is also + applicable for memory medium. The maximum usage on memory + medium EmptyDir would be the minimum value between the SizeLimit + specified here and the sum of memory limits of all containers + in a pod. The default is nil which means that the limit + is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + description: "ephemeral represents a volume that is handled by + a cluster storage driver. The volume's lifecycle is tied to + the pod that defines it - it will be created before the pod + starts, and deleted when the pod is removed. \n Use this if: + a) the volume is only needed while the pod runs, b) features + of normal volumes like restoring from snapshot or capacity tracking + are needed, c) the storage driver is specified through a storage + class, and d) the storage driver supports dynamic volume provisioning + through a PersistentVolumeClaim (see EphemeralVolumeSource for + more information on the connection between this volume type + and PersistentVolumeClaim). \n Use PersistentVolumeClaim or + one of the vendor-specific APIs for volumes that persist for + longer than the lifecycle of an individual pod. \n Use CSI for + light-weight local ephemeral volumes if the CSI driver is meant + to be used that way - see the documentation of the driver for + more information. \n A pod can use both types of ephemeral volumes + and persistent volumes at the same time." + properties: + volumeClaimTemplate: + description: "Will be used to create a stand-alone PVC to + provision the volume. The pod in which this EphemeralVolumeSource + is embedded will be the owner of the PVC, i.e. the PVC will + be deleted together with the pod. The name of the PVC will + be `-` where `` is the + name from the `PodSpec.Volumes` array entry. Pod validation + will reject the pod if the concatenated name is not valid + for a PVC (for example, too long). \n An existing PVC with + that name that is not owned by the pod will *not* be used + for the pod to avoid using an unrelated volume by mistake. + Starting the pod is then blocked until the unrelated PVC + is removed. If such a pre-created PVC is meant to be used + by the pod, the PVC has to updated with an owner reference + to the pod once the pod exists. Normally this should not + be necessary, but it may be useful when manually reconstructing + a broken cluster. \n This field is read-only and no changes + will be made by Kubernetes to the PVC after it has been + created. \n Required, must not be nil." + properties: + metadata: + description: May contain labels and annotations that will + be copied into the PVC when creating it. No other fields + are allowed and will be rejected during validation. + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: The specification for the PersistentVolumeClaim. + The entire content is copied unchanged into the PVC + that gets created from this template. The same fields + as in a PersistentVolumeClaim are also valid here. + properties: + accessModes: + description: 'accessModes contains the desired access + modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'dataSource field can be used to specify + either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) + * An existing PVC (PersistentVolumeClaim) If the + provisioner or an external controller can support + the specified data source, it will create a new + volume based on the contents of the specified data + source. When the AnyVolumeDataSource feature gate + is enabled, dataSource contents will be copied to + dataSourceRef, and dataSourceRef contents will be + copied to dataSource when dataSourceRef.namespace + is not specified. If the namespace is specified, + then dataSourceRef will not be copied to dataSource.' + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, + the specified Kind must be in the core API group. + For any other third-party types, APIGroup is + required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + description: 'dataSourceRef specifies the object from + which to populate the volume with data, if a non-empty + volume is desired. This may be any object from a + non-empty API group (non core object) or a PersistentVolumeClaim + object. When this field is specified, volume binding + will only succeed if the type of the specified object + matches some installed volume populator or dynamic + provisioner. This field will replace the functionality + of the dataSource field and as such if both fields + are non-empty, they must have the same value. For + backwards compatibility, when namespace isn''t specified + in dataSourceRef, both fields (dataSource and dataSourceRef) + will be set to the same value automatically if one + of them is empty and the other is non-empty. When + namespace is specified in dataSourceRef, dataSource + isn''t set to the same value and must be empty. + There are three important differences between dataSource + and dataSourceRef: * While dataSource only allows + two specific types of objects, dataSourceRef allows + any non-core object, as well as PersistentVolumeClaim + objects. * While dataSource ignores disallowed values + (dropping them), dataSourceRef preserves all values, + and generates an error if a disallowed value is + specified. * While dataSource only allows local + objects, dataSourceRef allows objects in any namespaces. + (Beta) Using this field requires the AnyVolumeDataSource + feature gate to be enabled. (Alpha) Using the namespace + field of dataSourceRef requires the CrossNamespaceVolumeDataSource + feature gate to be enabled.' + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, + the specified Kind must be in the core API group. + For any other third-party types, APIGroup is + required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + namespace: + description: Namespace is the namespace of resource + being referenced Note that when a namespace + is specified, a gateway.networking.k8s.io/ReferenceGrant + object is required in the referent namespace + to allow that namespace's owner to accept the + reference. See the ReferenceGrant documentation + for details. (Alpha) This field requires the + CrossNamespaceVolumeDataSource feature gate + to be enabled. + type: string + required: + - kind + - name + type: object + resources: + description: 'resources represents the minimum resources + the volume should have. If RecoverVolumeExpansionFailure + feature is enabled users are allowed to specify + resource requirements that are lower than previous + value but must still be higher than capacity recorded + in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used + by this container. \n This is an alpha field + and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It + can only be set for containers." + items: + description: ResourceClaim references one entry + in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of + one entry in pod.spec.resourceClaims of + the Pod where this field is used. It makes + that resource available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount + of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount + of compute resources required. If Requests is + omitted for a container, it defaults to Limits + if that is explicitly specified, otherwise to + an implementation-defined value. More info: + https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + selector: + description: selector is a label query over volumes + to consider for binding. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement is + a selector that contains values, a key, and + an operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If + the operator is Exists or DoesNotExist, + the values array must be empty. This array + is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + description: 'storageClassName is the name of the + StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type of volume + is required by the claim. Value of Filesystem is + implied when not included in claim spec. + type: string + volumeName: + description: volumeName is the binding reference to + the PersistentVolume backing this claim. + type: string + type: object + required: + - spec + type: object + type: object + fc: + description: fc represents a Fibre Channel resource that is attached + to a kubelet's host machine and then exposed to the pod. + properties: + fsType: + description: 'fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. TODO: how do we prevent errors in the filesystem + from compromising the machine' + type: string + lun: + description: 'lun is Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'readOnly is Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'targetWWNs is Optional: FC target worldwide + names (WWNs)' + items: + type: string + type: array + wwids: + description: 'wwids Optional: FC volume world wide identifiers + (wwids) Either wwids or combination of targetWWNs and lun + must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: flexVolume represents a generic volume resource that + is provisioned/attached using an exec based plugin. + properties: + driver: + description: driver is the name of the driver to use for this + volume. + type: string + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". The default filesystem depends + on FlexVolume script. + type: string + options: + additionalProperties: + type: string + description: 'options is Optional: this field holds extra + command options if any.' + type: object + readOnly: + description: 'readOnly is Optional: defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'secretRef is Optional: secretRef is reference + to the secret object containing sensitive information to + pass to the plugin scripts. This may be empty if no secret + object is specified. If the secret object contains more + than one secret, all secrets are passed to the plugin scripts.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - driver + type: object + flocker: + description: flocker represents a Flocker volume attached to a + kubelet's host machine. This depends on the Flocker control + service being running + properties: + datasetName: + description: datasetName is Name of the dataset stored as + metadata -> name on the dataset for Flocker should be considered + as deprecated + type: string + datasetUUID: + description: datasetUUID is the UUID of the dataset. This + is unique identifier of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'gcePersistentDisk represents a GCE Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'fsType is filesystem type of the volume that + you want to mount. Tip: Ensure that the filesystem type + is supported by the host operating system. Examples: "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + partition: + description: 'partition is the partition in the volume that + you want to mount. If omitted, the default is to mount by + volume name. Examples: For volume /dev/sda1, you specify + the partition as "1". Similarly, the volume partition for + /dev/sda is "0" (or you can leave the property empty). More + info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'pdName is unique name of the PD resource in + GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'readOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'gitRepo represents a git repository at a particular + revision. DEPRECATED: GitRepo is deprecated. To provision a + container with a git repo, mount an EmptyDir into an InitContainer + that clones the repo using git, then mount the EmptyDir into + the Pod''s container.' + properties: + directory: + description: directory is the target directory name. Must + not contain or start with '..'. If '.' is supplied, the + volume directory will be the git repository. Otherwise, + if specified, the volume will contain the git repository + in the subdirectory with the given name. + type: string + repository: + description: repository is the URL + type: string + revision: + description: revision is the commit hash for the specified + revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'glusterfs represents a Glusterfs mount on the host + that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'endpoints is the endpoint name that details + Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'path is the Glusterfs volume path. More info: + https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'readOnly here will force the Glusterfs volume + to be mounted with read-only permissions. Defaults to false. + More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'hostPath represents a pre-existing file or directory + on the host machine that is directly exposed to the container. + This is generally used for system agents or other privileged + things that are allowed to see the host machine. Most containers + will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + --- TODO(jonesdl) We need to restrict who can use host directory + mounts and who can/can not mount host directories as read/write.' + properties: + path: + description: 'path of the directory on the host. If the path + is a symlink, it will follow the link to the real path. + More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'type for HostPath Volume Defaults to "" More + info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'iscsi represents an ISCSI Disk resource that is + attached to a kubelet''s host machine and then exposed to the + pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: chapAuthDiscovery defines whether support iSCSI + Discovery CHAP authentication + type: boolean + chapAuthSession: + description: chapAuthSession defines whether support iSCSI + Session CHAP authentication + type: boolean + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + initiatorName: + description: initiatorName is the custom iSCSI Initiator Name. + If initiatorName is specified with iscsiInterface simultaneously, + new iSCSI interface : will be + created for the connection. + type: string + iqn: + description: iqn is the target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iscsiInterface is the interface Name that uses + an iSCSI transport. Defaults to 'default' (tcp). + type: string + lun: + description: lun represents iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: portals is the iSCSI Target Portal List. The + portal is either an IP or ip_addr:port if the port is other + than default (typically TCP ports 860 and 3260). + items: + type: string + type: array + readOnly: + description: readOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: secretRef is the CHAP Secret for iSCSI target + and initiator authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + targetPortal: + description: targetPortal is iSCSI Target Portal. The Portal + is either an IP or ip_addr:port if the port is other than + default (typically TCP ports 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + nfs: + description: 'nfs represents an NFS mount on the host that shares + a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'path that is exported by the NFS server. More + info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'readOnly here will force the NFS export to be + mounted with read-only permissions. Defaults to false. More + info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'server is the hostname or IP address of the + NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'persistentVolumeClaimVolumeSource represents a reference + to a PersistentVolumeClaim in the same namespace. More info: + https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'claimName is the name of a PersistentVolumeClaim + in the same namespace as the pod using this volume. More + info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: readOnly Will force the ReadOnly setting in VolumeMounts. + Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: photonPersistentDisk represents a PhotonController + persistent disk attached and mounted on kubelets host machine + properties: + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + pdID: + description: pdID is the ID that identifies Photon Controller + persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: portworxVolume represents a portworx volume attached + and mounted on kubelets host machine + properties: + fsType: + description: fSType represents the filesystem type to mount + Must be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + readOnly: + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: volumeID uniquely identifies a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: projected items for all in one resources secrets, + configmaps, and downward API + properties: + defaultMode: + description: defaultMode are the mode bits used to set permissions + on created files by default. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires decimal + values for mode bits. Directories within the path are not + affected by this setting. This might be in conflict with + other options that affect the file mode, like fsGroup, and + the result can be other mode bits set. + format: int32 + type: integer + sources: + description: sources is the list of volume projections + items: + description: Projection that may be projected along with + other supported volume types + properties: + configMap: + description: configMap information about the configMap + data to project + properties: + items: + description: items if unspecified, each key-value + pair in the Data field of the referenced ConfigMap + will be projected into the volume as a file whose + name is the key and content is the value. If specified, + the listed keys will be projected into the specified + paths, and unlisted keys will not be present. + If a key is specified which is not present in + the ConfigMap, the volume setup will error unless + it is marked optional. Paths must be relative + and may not contain the '..' path or start with + '..'. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits + used to set permissions on this file. Must + be an octal value between 0000 and 0777 + or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON + requires decimal values for mode bits. If + not specified, the volume defaultMode will + be used. This might be in conflict with + other options that affect the file mode, + like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + path: + description: path is the relative path of + the file to map the key to. May not be an + absolute path. May not contain the path + element '..'. May not start with the string + '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: optional specify whether the ConfigMap + or its keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + description: downwardAPI information about the downwardAPI + data to project + properties: + items: + description: Items is a list of DownwardAPIVolume + file + items: + description: DownwardAPIVolumeFile represents + information to create the file containing the + pod field + properties: + fieldRef: + description: 'Required: Selects a field of + the pod: only annotations, labels, name + and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the + FieldPath is written in terms of, defaults + to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + description: 'Optional: mode bits used to + set permissions on this file, must be an + octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both + octal and decimal values, JSON requires + decimal values for mode bits. If not specified, + the volume defaultMode will be used. This + might be in conflict with other options + that affect the file mode, like fsGroup, + and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative + path name of the file to be created. Must + not be absolute or contain the ''..'' path. + Must be utf-8 encoded. The first item of + the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, requests.cpu and requests.memory) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults to + "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + type: object + secret: + description: secret information about the secret data + to project + properties: + items: + description: items if unspecified, each key-value + pair in the Data field of the referenced Secret + will be projected into the volume as a file whose + name is the key and content is the value. If specified, + the listed keys will be projected into the specified + paths, and unlisted keys will not be present. + If a key is specified which is not present in + the Secret, the volume setup will error unless + it is marked optional. Paths must be relative + and may not contain the '..' path or start with + '..'. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits + used to set permissions on this file. Must + be an octal value between 0000 and 0777 + or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON + requires decimal values for mode bits. If + not specified, the volume defaultMode will + be used. This might be in conflict with + other options that affect the file mode, + like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + path: + description: path is the relative path of + the file to map the key to. May not be an + absolute path. May not contain the path + element '..'. May not start with the string + '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: optional field specify whether the + Secret or its key must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + description: serviceAccountToken is information about + the serviceAccountToken data to project + properties: + audience: + description: audience is the intended audience of + the token. A recipient of a token must identify + itself with an identifier specified in the audience + of the token, and otherwise should reject the + token. The audience defaults to the identifier + of the apiserver. + type: string + expirationSeconds: + description: expirationSeconds is the requested + duration of validity of the service account token. + As the token approaches expiration, the kubelet + volume plugin will proactively rotate the service + account token. The kubelet will start trying to + rotate the token if the token is older than 80 + percent of its time to live or if the token is + older than 24 hours.Defaults to 1 hour and must + be at least 10 minutes. + format: int64 + type: integer + path: + description: path is the path relative to the mount + point of the file to project the token into. + type: string + required: + - path + type: object + type: object + type: array + type: object + quobyte: + description: quobyte represents a Quobyte mount on the host that + shares a pod's lifetime + properties: + group: + description: group to map volume access to Default is no group + type: string + readOnly: + description: readOnly here will force the Quobyte volume to + be mounted with read-only permissions. Defaults to false. + type: boolean + registry: + description: registry represents a single or multiple Quobyte + Registry services specified as a string as host:port pair + (multiple entries are separated with commas) which acts + as the central registry for volumes + type: string + tenant: + description: tenant owning the given Quobyte volume in the + Backend Used with dynamically provisioned Quobyte volumes, + value is set by the plugin + type: string + user: + description: user to map volume access to Defaults to serivceaccount + user + type: string + volume: + description: volume is a string that references an already + created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'rbd represents a Rados Block Device mount on the + host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + image: + description: 'image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'keyring is the path to key ring for RBDUser. + Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'monitors is a collection of Ceph monitors. More + info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'pool is the rados pool name. Default is rbd. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'readOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'secretRef is name of the authentication secret + for RBDUser. If provided overrides keyring. Default is nil. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + user: + description: 'user is the rados user name. Default is admin. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: scaleIO represents a ScaleIO persistent volume attached + and mounted on Kubernetes nodes. + properties: + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: gateway is the host address of the ScaleIO API + Gateway. + type: string + protectionDomain: + description: protectionDomain is the name of the ScaleIO Protection + Domain for the configured storage. + type: string + readOnly: + description: readOnly Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: secretRef references to the secret for ScaleIO + user and other sensitive information. If this is not provided, + Login operation will fail. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + sslEnabled: + description: sslEnabled Flag enable/disable SSL communication + with Gateway, default false + type: boolean + storageMode: + description: storageMode indicates whether the storage for + a volume should be ThickProvisioned or ThinProvisioned. + Default is ThinProvisioned. + type: string + storagePool: + description: storagePool is the ScaleIO Storage Pool associated + with the protection domain. + type: string + system: + description: system is the name of the storage system as configured + in ScaleIO. + type: string + volumeName: + description: volumeName is the name of a volume already created + in the ScaleIO system that is associated with this volume + source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'secret represents a secret that should populate + this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'defaultMode is Optional: mode bits used to set + permissions on created files by default. Must be an octal + value between 0000 and 0777 or a decimal value between 0 + and 511. YAML accepts both octal and decimal values, JSON + requires decimal values for mode bits. Defaults to 0644. + Directories within the path are not affected by this setting. + This might be in conflict with other options that affect + the file mode, like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + items: + description: items If unspecified, each key-value pair in + the Data field of the referenced Secret will be projected + into the volume as a file whose name is the key and content + is the value. If specified, the listed keys will be projected + into the specified paths, and unlisted keys will not be + present. If a key is specified which is not present in the + Secret, the volume setup will error unless it is marked + optional. Paths must be relative and may not contain the + '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits used to set + permissions on this file. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. + YAML accepts both octal and decimal values, JSON requires + decimal values for mode bits. If not specified, the + volume defaultMode will be used. This might be in + conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits + set.' + format: int32 + type: integer + path: + description: path is the relative path of the file to + map the key to. May not be an absolute path. May not + contain the path element '..'. May not start with + the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: optional field specify whether the Secret or + its keys must be defined + type: boolean + secretName: + description: 'secretName is the name of the secret in the + pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + type: string + type: object + storageos: + description: storageOS represents a StorageOS volume attached + and mounted on Kubernetes nodes. + properties: + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + readOnly: + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: secretRef specifies the secret to use for obtaining + the StorageOS API credentials. If not specified, default + values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + volumeName: + description: volumeName is the human-readable name of the + StorageOS volume. Volume names are only unique within a + namespace. + type: string + volumeNamespace: + description: volumeNamespace specifies the scope of the volume + within StorageOS. If no namespace is specified then the + Pod's namespace will be used. This allows the Kubernetes + name scoping to be mirrored within StorageOS for tighter + integration. Set VolumeName to any name to override the + default behaviour. Set to "default" if you are not using + namespaces within StorageOS. Namespaces that do not pre-exist + within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: vsphereVolume represents a vSphere volume attached + and mounted on kubelets host machine + properties: + fsType: + description: fsType is filesystem type to mount. Must be a + filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + storagePolicyID: + description: storagePolicyID is the storage Policy Based Management + (SPBM) profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: storagePolicyName is the storage Policy Based + Management (SPBM) profile name. + type: string + volumePath: + description: volumePath is the path that identifies vSphere + volume vmdk + type: string + required: + - volumePath + type: object + type: object priorityClassName: description: PriorityClassName represents the pod's priority class. type: string @@ -20455,7 +22166,8 @@ spec: type: object type: array replicas: - description: Numbers of the Fluentd instance + description: Numbers of the Fluentd instance Applicable when the mode + is "collector", and will be ignored when the mode is "agent" format: int32 type: integer resources: @@ -20749,6 +22461,8 @@ spec: for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. + Applicable when the mode is "collector", and will be ignored when + the mode is "agent" items: description: PersistentVolumeClaim is a user's request for and claim to a persistent volume diff --git a/manifests/setup/setup.yaml b/manifests/setup/setup.yaml index 4a2575e6a..e607bbd89 100644 --- a/manifests/setup/setup.yaml +++ b/manifests/setup/setup.yaml @@ -19414,6 +19414,166 @@ spec: type: object type: object type: object + containerSecurityContext: + description: ContainerSecurityContext represents the security context + for the fluentd container. + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether a process + can gain more privileges than its parent process. This bool + directly controls if the no_new_privs flag will be set on the + container process. AllowPrivilegeEscalation is true always when + the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN + Note that this field cannot be set when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the container + runtime. Note that this field cannot be set when spec.os.name + is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in privileged + containers are essentially equivalent to root on the host. Defaults + to false. Note that this field cannot be set when spec.os.name + is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount to use for + the containers. The default is DefaultProcMount which uses the + container runtime defaults for readonly paths and masked paths. + This requires the ProcMountType feature flag to be enabled. + Note that this field cannot be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. + Default is false. Note that this field cannot be set when spec.os.name + is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container process. + Uses runtime default if unset. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. Note that this + field cannot be set when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. If true, the Kubelet will validate the image at runtime + to ensure that it does not run as UID 0 (root) and fail to start + the container if it does. If unset or false, no such validation + will be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set when spec.os.name + is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. Note that this + field cannot be set when spec.os.name is windows. + properties: + level: + description: Level is SELinux level label that applies to + the container. + type: string + role: + description: Role is a SELinux role label that applies to + the container. + type: string + type: + description: Type is a SELinux type label that applies to + the container. + type: string + user: + description: User is a SELinux user label that applies to + the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. If + seccomp options are provided at both the pod & container level, + the container options override the pod options. Note that this + field cannot be set when spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must be + preconfigured on the node to work. Must be a descending + path, relative to the kubelet's configured seccomp profile + location. Must only be set if type is "Localhost". + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a profile + defined in a file on the node should be used. RuntimeDefault + - the container runtime default profile should be used. + Unconfined - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all containers. + If unspecified, the options from the PodSecurityContext will + be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named by + the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA + credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. This field is alpha-level + and will only be honored by components that enable the WindowsHostProcessContainers + feature flag. Setting this field without the feature flag + will result in errors when validating the Pod. All of a + Pod's containers must have the same effective HostProcess + value (it is not allowed to have a mix of HostProcess containers + and non-HostProcess containers). In addition, if HostProcess + is true then HostNetwork must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in PodSecurityContext. + If set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. + type: string + type: object + type: object defaultFilterSelector: description: Select cluster filter plugins used to filter for the default cluster output @@ -20395,11 +20555,1562 @@ spec: - debug - trace type: string + mode: + default: collector + description: Mode to determine whether to run Fluentd as collector + or agent. + enum: + - collector + - agent + type: string nodeSelector: additionalProperties: type: string description: NodeSelector type: object + positionDB: + description: Storage for position db. You will use it if tail input + is enabled. Applicable when the mode is "agent", and will be ignored + when the mode is "collector" + properties: + awsElasticBlockStore: + description: 'awsElasticBlockStore represents an AWS Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + partition: + description: 'partition is the partition in the volume that + you want to mount. If omitted, the default is to mount by + volume name. Examples: For volume /dev/sda1, you specify + the partition as "1". Similarly, the volume partition for + /dev/sda is "0" (or you can leave the property empty).' + format: int32 + type: integer + readOnly: + description: 'readOnly value true will force the readOnly + setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'volumeID is unique ID of the persistent disk + resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: azureDisk represents an Azure Data Disk mount on + the host and bind mount to the pod. + properties: + cachingMode: + description: 'cachingMode is the Host Caching mode: None, + Read Only, Read Write.' + type: string + diskName: + description: diskName is the Name of the data disk in the + blob storage + type: string + diskURI: + description: diskURI is the URI of data disk in the blob storage + type: string + fsType: + description: fsType is Filesystem type to mount. Must be a + filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + kind: + description: 'kind expected values are Shared: multiple blob + disks per storage account Dedicated: single blob disk per + storage account Managed: azure managed data disk (only + in managed availability set). defaults to shared' + type: string + readOnly: + description: readOnly Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: azureFile represents an Azure File Service mount + on the host and bind mount to the pod. + properties: + readOnly: + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: secretName is the name of secret that contains + Azure Storage Account Name and Key + type: string + shareName: + description: shareName is the azure share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: cephFS represents a Ceph FS mount on the host that + shares a pod's lifetime + properties: + monitors: + description: 'monitors is Required: Monitors is a collection + of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'path is Optional: Used as the mounted root, + rather than the full Ceph tree, default is /' + type: string + readOnly: + description: 'readOnly is Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'secretFile is Optional: SecretFile is the path + to key ring for User, default is /etc/ceph/user.secret More + info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'secretRef is Optional: SecretRef is reference + to the authentication secret for User, default is empty. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + user: + description: 'user is optional: User is the rados user name, + default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'cinder represents a cinder volume attached and mounted + on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Examples: "ext4", "xfs", "ntfs". Implicitly inferred to + be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. More + info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'secretRef is optional: points to a secret object + containing parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + volumeID: + description: 'volumeID used to identify the volume in cinder. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: configMap represents a configMap that should populate + this volume + properties: + defaultMode: + description: 'defaultMode is optional: mode bits used to set + permissions on created files by default. Must be an octal + value between 0000 and 0777 or a decimal value between 0 + and 511. YAML accepts both octal and decimal values, JSON + requires decimal values for mode bits. Defaults to 0644. + Directories within the path are not affected by this setting. + This might be in conflict with other options that affect + the file mode, like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + items: + description: items if unspecified, each key-value pair in + the Data field of the referenced ConfigMap will be projected + into the volume as a file whose name is the key and content + is the value. If specified, the listed keys will be projected + into the specified paths, and unlisted keys will not be + present. If a key is specified which is not present in the + ConfigMap, the volume setup will error unless it is marked + optional. Paths must be relative and may not contain the + '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits used to set + permissions on this file. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. + YAML accepts both octal and decimal values, JSON requires + decimal values for mode bits. If not specified, the + volume defaultMode will be used. This might be in + conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits + set.' + format: int32 + type: integer + path: + description: path is the relative path of the file to + map the key to. May not be an absolute path. May not + contain the path element '..'. May not start with + the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: optional specify whether the ConfigMap or its + keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + description: csi (Container Storage Interface) represents ephemeral + storage that is handled by certain external CSI drivers (Beta + feature). + properties: + driver: + description: driver is the name of the CSI driver that handles + this volume. Consult with your admin for the correct name + as registered in the cluster. + type: string + fsType: + description: fsType to mount. Ex. "ext4", "xfs", "ntfs". If + not provided, the empty value is passed to the associated + CSI driver which will determine the default filesystem to + apply. + type: string + nodePublishSecretRef: + description: nodePublishSecretRef is a reference to the secret + object containing sensitive information to pass to the CSI + driver to complete the CSI NodePublishVolume and NodeUnpublishVolume + calls. This field is optional, and may be empty if no secret + is required. If the secret object contains more than one + secret, all secret references are passed. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + readOnly: + description: readOnly specifies a read-only configuration + for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: volumeAttributes stores driver-specific properties + that are passed to the CSI driver. Consult your driver's + documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: downwardAPI represents downward API about the pod + that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files + by default. Must be a Optional: mode bits used to set permissions + on created files by default. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires decimal + values for mode bits. Defaults to 0644. Directories within + the path are not affected by this setting. This might be + in conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume file + items: + description: DownwardAPIVolumeFile represents information + to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: + only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + description: 'Optional: mode bits used to set permissions + on this file, must be an octal value between 0000 + and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires + decimal values for mode bits. If not specified, the + volume defaultMode will be used. This might be in + conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits + set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name + of the file to be created. Must not be absolute or + contain the ''..'' path. Must be utf-8 encoded. The + first item of the relative path must not start with + ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'emptyDir represents a temporary directory that shares + a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'medium represents what type of storage medium + should back this directory. The default is "" which means + to use the node''s default medium. Must be an empty string + (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'sizeLimit is the total amount of local storage + required for this EmptyDir volume. The size limit is also + applicable for memory medium. The maximum usage on memory + medium EmptyDir would be the minimum value between the SizeLimit + specified here and the sum of memory limits of all containers + in a pod. The default is nil which means that the limit + is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + description: "ephemeral represents a volume that is handled by + a cluster storage driver. The volume's lifecycle is tied to + the pod that defines it - it will be created before the pod + starts, and deleted when the pod is removed. \n Use this if: + a) the volume is only needed while the pod runs, b) features + of normal volumes like restoring from snapshot or capacity tracking + are needed, c) the storage driver is specified through a storage + class, and d) the storage driver supports dynamic volume provisioning + through a PersistentVolumeClaim (see EphemeralVolumeSource for + more information on the connection between this volume type + and PersistentVolumeClaim). \n Use PersistentVolumeClaim or + one of the vendor-specific APIs for volumes that persist for + longer than the lifecycle of an individual pod. \n Use CSI for + light-weight local ephemeral volumes if the CSI driver is meant + to be used that way - see the documentation of the driver for + more information. \n A pod can use both types of ephemeral volumes + and persistent volumes at the same time." + properties: + volumeClaimTemplate: + description: "Will be used to create a stand-alone PVC to + provision the volume. The pod in which this EphemeralVolumeSource + is embedded will be the owner of the PVC, i.e. the PVC will + be deleted together with the pod. The name of the PVC will + be `-` where `` is the + name from the `PodSpec.Volumes` array entry. Pod validation + will reject the pod if the concatenated name is not valid + for a PVC (for example, too long). \n An existing PVC with + that name that is not owned by the pod will *not* be used + for the pod to avoid using an unrelated volume by mistake. + Starting the pod is then blocked until the unrelated PVC + is removed. If such a pre-created PVC is meant to be used + by the pod, the PVC has to updated with an owner reference + to the pod once the pod exists. Normally this should not + be necessary, but it may be useful when manually reconstructing + a broken cluster. \n This field is read-only and no changes + will be made by Kubernetes to the PVC after it has been + created. \n Required, must not be nil." + properties: + metadata: + description: May contain labels and annotations that will + be copied into the PVC when creating it. No other fields + are allowed and will be rejected during validation. + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: The specification for the PersistentVolumeClaim. + The entire content is copied unchanged into the PVC + that gets created from this template. The same fields + as in a PersistentVolumeClaim are also valid here. + properties: + accessModes: + description: 'accessModes contains the desired access + modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'dataSource field can be used to specify + either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) + * An existing PVC (PersistentVolumeClaim) If the + provisioner or an external controller can support + the specified data source, it will create a new + volume based on the contents of the specified data + source. When the AnyVolumeDataSource feature gate + is enabled, dataSource contents will be copied to + dataSourceRef, and dataSourceRef contents will be + copied to dataSource when dataSourceRef.namespace + is not specified. If the namespace is specified, + then dataSourceRef will not be copied to dataSource.' + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, + the specified Kind must be in the core API group. + For any other third-party types, APIGroup is + required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + description: 'dataSourceRef specifies the object from + which to populate the volume with data, if a non-empty + volume is desired. This may be any object from a + non-empty API group (non core object) or a PersistentVolumeClaim + object. When this field is specified, volume binding + will only succeed if the type of the specified object + matches some installed volume populator or dynamic + provisioner. This field will replace the functionality + of the dataSource field and as such if both fields + are non-empty, they must have the same value. For + backwards compatibility, when namespace isn''t specified + in dataSourceRef, both fields (dataSource and dataSourceRef) + will be set to the same value automatically if one + of them is empty and the other is non-empty. When + namespace is specified in dataSourceRef, dataSource + isn''t set to the same value and must be empty. + There are three important differences between dataSource + and dataSourceRef: * While dataSource only allows + two specific types of objects, dataSourceRef allows + any non-core object, as well as PersistentVolumeClaim + objects. * While dataSource ignores disallowed values + (dropping them), dataSourceRef preserves all values, + and generates an error if a disallowed value is + specified. * While dataSource only allows local + objects, dataSourceRef allows objects in any namespaces. + (Beta) Using this field requires the AnyVolumeDataSource + feature gate to be enabled. (Alpha) Using the namespace + field of dataSourceRef requires the CrossNamespaceVolumeDataSource + feature gate to be enabled.' + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, + the specified Kind must be in the core API group. + For any other third-party types, APIGroup is + required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + namespace: + description: Namespace is the namespace of resource + being referenced Note that when a namespace + is specified, a gateway.networking.k8s.io/ReferenceGrant + object is required in the referent namespace + to allow that namespace's owner to accept the + reference. See the ReferenceGrant documentation + for details. (Alpha) This field requires the + CrossNamespaceVolumeDataSource feature gate + to be enabled. + type: string + required: + - kind + - name + type: object + resources: + description: 'resources represents the minimum resources + the volume should have. If RecoverVolumeExpansionFailure + feature is enabled users are allowed to specify + resource requirements that are lower than previous + value but must still be higher than capacity recorded + in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used + by this container. \n This is an alpha field + and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It + can only be set for containers." + items: + description: ResourceClaim references one entry + in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of + one entry in pod.spec.resourceClaims of + the Pod where this field is used. It makes + that resource available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount + of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount + of compute resources required. If Requests is + omitted for a container, it defaults to Limits + if that is explicitly specified, otherwise to + an implementation-defined value. More info: + https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + selector: + description: selector is a label query over volumes + to consider for binding. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement is + a selector that contains values, a key, and + an operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If + the operator is Exists or DoesNotExist, + the values array must be empty. This array + is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + description: 'storageClassName is the name of the + StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type of volume + is required by the claim. Value of Filesystem is + implied when not included in claim spec. + type: string + volumeName: + description: volumeName is the binding reference to + the PersistentVolume backing this claim. + type: string + type: object + required: + - spec + type: object + type: object + fc: + description: fc represents a Fibre Channel resource that is attached + to a kubelet's host machine and then exposed to the pod. + properties: + fsType: + description: 'fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. TODO: how do we prevent errors in the filesystem + from compromising the machine' + type: string + lun: + description: 'lun is Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'readOnly is Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'targetWWNs is Optional: FC target worldwide + names (WWNs)' + items: + type: string + type: array + wwids: + description: 'wwids Optional: FC volume world wide identifiers + (wwids) Either wwids or combination of targetWWNs and lun + must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: flexVolume represents a generic volume resource that + is provisioned/attached using an exec based plugin. + properties: + driver: + description: driver is the name of the driver to use for this + volume. + type: string + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". The default filesystem depends + on FlexVolume script. + type: string + options: + additionalProperties: + type: string + description: 'options is Optional: this field holds extra + command options if any.' + type: object + readOnly: + description: 'readOnly is Optional: defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'secretRef is Optional: secretRef is reference + to the secret object containing sensitive information to + pass to the plugin scripts. This may be empty if no secret + object is specified. If the secret object contains more + than one secret, all secrets are passed to the plugin scripts.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - driver + type: object + flocker: + description: flocker represents a Flocker volume attached to a + kubelet's host machine. This depends on the Flocker control + service being running + properties: + datasetName: + description: datasetName is Name of the dataset stored as + metadata -> name on the dataset for Flocker should be considered + as deprecated + type: string + datasetUUID: + description: datasetUUID is the UUID of the dataset. This + is unique identifier of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'gcePersistentDisk represents a GCE Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'fsType is filesystem type of the volume that + you want to mount. Tip: Ensure that the filesystem type + is supported by the host operating system. Examples: "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + partition: + description: 'partition is the partition in the volume that + you want to mount. If omitted, the default is to mount by + volume name. Examples: For volume /dev/sda1, you specify + the partition as "1". Similarly, the volume partition for + /dev/sda is "0" (or you can leave the property empty). More + info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'pdName is unique name of the PD resource in + GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'readOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'gitRepo represents a git repository at a particular + revision. DEPRECATED: GitRepo is deprecated. To provision a + container with a git repo, mount an EmptyDir into an InitContainer + that clones the repo using git, then mount the EmptyDir into + the Pod''s container.' + properties: + directory: + description: directory is the target directory name. Must + not contain or start with '..'. If '.' is supplied, the + volume directory will be the git repository. Otherwise, + if specified, the volume will contain the git repository + in the subdirectory with the given name. + type: string + repository: + description: repository is the URL + type: string + revision: + description: revision is the commit hash for the specified + revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'glusterfs represents a Glusterfs mount on the host + that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'endpoints is the endpoint name that details + Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'path is the Glusterfs volume path. More info: + https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'readOnly here will force the Glusterfs volume + to be mounted with read-only permissions. Defaults to false. + More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'hostPath represents a pre-existing file or directory + on the host machine that is directly exposed to the container. + This is generally used for system agents or other privileged + things that are allowed to see the host machine. Most containers + will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + --- TODO(jonesdl) We need to restrict who can use host directory + mounts and who can/can not mount host directories as read/write.' + properties: + path: + description: 'path of the directory on the host. If the path + is a symlink, it will follow the link to the real path. + More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'type for HostPath Volume Defaults to "" More + info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'iscsi represents an ISCSI Disk resource that is + attached to a kubelet''s host machine and then exposed to the + pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: chapAuthDiscovery defines whether support iSCSI + Discovery CHAP authentication + type: boolean + chapAuthSession: + description: chapAuthSession defines whether support iSCSI + Session CHAP authentication + type: boolean + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + initiatorName: + description: initiatorName is the custom iSCSI Initiator Name. + If initiatorName is specified with iscsiInterface simultaneously, + new iSCSI interface : will be + created for the connection. + type: string + iqn: + description: iqn is the target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iscsiInterface is the interface Name that uses + an iSCSI transport. Defaults to 'default' (tcp). + type: string + lun: + description: lun represents iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: portals is the iSCSI Target Portal List. The + portal is either an IP or ip_addr:port if the port is other + than default (typically TCP ports 860 and 3260). + items: + type: string + type: array + readOnly: + description: readOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: secretRef is the CHAP Secret for iSCSI target + and initiator authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + targetPortal: + description: targetPortal is iSCSI Target Portal. The Portal + is either an IP or ip_addr:port if the port is other than + default (typically TCP ports 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + nfs: + description: 'nfs represents an NFS mount on the host that shares + a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'path that is exported by the NFS server. More + info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'readOnly here will force the NFS export to be + mounted with read-only permissions. Defaults to false. More + info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'server is the hostname or IP address of the + NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'persistentVolumeClaimVolumeSource represents a reference + to a PersistentVolumeClaim in the same namespace. More info: + https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'claimName is the name of a PersistentVolumeClaim + in the same namespace as the pod using this volume. More + info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: readOnly Will force the ReadOnly setting in VolumeMounts. + Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: photonPersistentDisk represents a PhotonController + persistent disk attached and mounted on kubelets host machine + properties: + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + pdID: + description: pdID is the ID that identifies Photon Controller + persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: portworxVolume represents a portworx volume attached + and mounted on kubelets host machine + properties: + fsType: + description: fSType represents the filesystem type to mount + Must be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + readOnly: + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: volumeID uniquely identifies a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: projected items for all in one resources secrets, + configmaps, and downward API + properties: + defaultMode: + description: defaultMode are the mode bits used to set permissions + on created files by default. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires decimal + values for mode bits. Directories within the path are not + affected by this setting. This might be in conflict with + other options that affect the file mode, like fsGroup, and + the result can be other mode bits set. + format: int32 + type: integer + sources: + description: sources is the list of volume projections + items: + description: Projection that may be projected along with + other supported volume types + properties: + configMap: + description: configMap information about the configMap + data to project + properties: + items: + description: items if unspecified, each key-value + pair in the Data field of the referenced ConfigMap + will be projected into the volume as a file whose + name is the key and content is the value. If specified, + the listed keys will be projected into the specified + paths, and unlisted keys will not be present. + If a key is specified which is not present in + the ConfigMap, the volume setup will error unless + it is marked optional. Paths must be relative + and may not contain the '..' path or start with + '..'. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits + used to set permissions on this file. Must + be an octal value between 0000 and 0777 + or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON + requires decimal values for mode bits. If + not specified, the volume defaultMode will + be used. This might be in conflict with + other options that affect the file mode, + like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + path: + description: path is the relative path of + the file to map the key to. May not be an + absolute path. May not contain the path + element '..'. May not start with the string + '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: optional specify whether the ConfigMap + or its keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + description: downwardAPI information about the downwardAPI + data to project + properties: + items: + description: Items is a list of DownwardAPIVolume + file + items: + description: DownwardAPIVolumeFile represents + information to create the file containing the + pod field + properties: + fieldRef: + description: 'Required: Selects a field of + the pod: only annotations, labels, name + and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the + FieldPath is written in terms of, defaults + to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + description: 'Optional: mode bits used to + set permissions on this file, must be an + octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both + octal and decimal values, JSON requires + decimal values for mode bits. If not specified, + the volume defaultMode will be used. This + might be in conflict with other options + that affect the file mode, like fsGroup, + and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative + path name of the file to be created. Must + not be absolute or contain the ''..'' path. + Must be utf-8 encoded. The first item of + the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, requests.cpu and requests.memory) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults to + "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + type: object + secret: + description: secret information about the secret data + to project + properties: + items: + description: items if unspecified, each key-value + pair in the Data field of the referenced Secret + will be projected into the volume as a file whose + name is the key and content is the value. If specified, + the listed keys will be projected into the specified + paths, and unlisted keys will not be present. + If a key is specified which is not present in + the Secret, the volume setup will error unless + it is marked optional. Paths must be relative + and may not contain the '..' path or start with + '..'. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits + used to set permissions on this file. Must + be an octal value between 0000 and 0777 + or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON + requires decimal values for mode bits. If + not specified, the volume defaultMode will + be used. This might be in conflict with + other options that affect the file mode, + like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + path: + description: path is the relative path of + the file to map the key to. May not be an + absolute path. May not contain the path + element '..'. May not start with the string + '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: optional field specify whether the + Secret or its key must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + description: serviceAccountToken is information about + the serviceAccountToken data to project + properties: + audience: + description: audience is the intended audience of + the token. A recipient of a token must identify + itself with an identifier specified in the audience + of the token, and otherwise should reject the + token. The audience defaults to the identifier + of the apiserver. + type: string + expirationSeconds: + description: expirationSeconds is the requested + duration of validity of the service account token. + As the token approaches expiration, the kubelet + volume plugin will proactively rotate the service + account token. The kubelet will start trying to + rotate the token if the token is older than 80 + percent of its time to live or if the token is + older than 24 hours.Defaults to 1 hour and must + be at least 10 minutes. + format: int64 + type: integer + path: + description: path is the path relative to the mount + point of the file to project the token into. + type: string + required: + - path + type: object + type: object + type: array + type: object + quobyte: + description: quobyte represents a Quobyte mount on the host that + shares a pod's lifetime + properties: + group: + description: group to map volume access to Default is no group + type: string + readOnly: + description: readOnly here will force the Quobyte volume to + be mounted with read-only permissions. Defaults to false. + type: boolean + registry: + description: registry represents a single or multiple Quobyte + Registry services specified as a string as host:port pair + (multiple entries are separated with commas) which acts + as the central registry for volumes + type: string + tenant: + description: tenant owning the given Quobyte volume in the + Backend Used with dynamically provisioned Quobyte volumes, + value is set by the plugin + type: string + user: + description: user to map volume access to Defaults to serivceaccount + user + type: string + volume: + description: volume is a string that references an already + created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'rbd represents a Rados Block Device mount on the + host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + image: + description: 'image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'keyring is the path to key ring for RBDUser. + Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'monitors is a collection of Ceph monitors. More + info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'pool is the rados pool name. Default is rbd. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'readOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'secretRef is name of the authentication secret + for RBDUser. If provided overrides keyring. Default is nil. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + user: + description: 'user is the rados user name. Default is admin. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: scaleIO represents a ScaleIO persistent volume attached + and mounted on Kubernetes nodes. + properties: + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: gateway is the host address of the ScaleIO API + Gateway. + type: string + protectionDomain: + description: protectionDomain is the name of the ScaleIO Protection + Domain for the configured storage. + type: string + readOnly: + description: readOnly Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: secretRef references to the secret for ScaleIO + user and other sensitive information. If this is not provided, + Login operation will fail. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + sslEnabled: + description: sslEnabled Flag enable/disable SSL communication + with Gateway, default false + type: boolean + storageMode: + description: storageMode indicates whether the storage for + a volume should be ThickProvisioned or ThinProvisioned. + Default is ThinProvisioned. + type: string + storagePool: + description: storagePool is the ScaleIO Storage Pool associated + with the protection domain. + type: string + system: + description: system is the name of the storage system as configured + in ScaleIO. + type: string + volumeName: + description: volumeName is the name of a volume already created + in the ScaleIO system that is associated with this volume + source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'secret represents a secret that should populate + this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'defaultMode is Optional: mode bits used to set + permissions on created files by default. Must be an octal + value between 0000 and 0777 or a decimal value between 0 + and 511. YAML accepts both octal and decimal values, JSON + requires decimal values for mode bits. Defaults to 0644. + Directories within the path are not affected by this setting. + This might be in conflict with other options that affect + the file mode, like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + items: + description: items If unspecified, each key-value pair in + the Data field of the referenced Secret will be projected + into the volume as a file whose name is the key and content + is the value. If specified, the listed keys will be projected + into the specified paths, and unlisted keys will not be + present. If a key is specified which is not present in the + Secret, the volume setup will error unless it is marked + optional. Paths must be relative and may not contain the + '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits used to set + permissions on this file. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. + YAML accepts both octal and decimal values, JSON requires + decimal values for mode bits. If not specified, the + volume defaultMode will be used. This might be in + conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits + set.' + format: int32 + type: integer + path: + description: path is the relative path of the file to + map the key to. May not be an absolute path. May not + contain the path element '..'. May not start with + the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: optional field specify whether the Secret or + its keys must be defined + type: boolean + secretName: + description: 'secretName is the name of the secret in the + pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + type: string + type: object + storageos: + description: storageOS represents a StorageOS volume attached + and mounted on Kubernetes nodes. + properties: + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + readOnly: + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: secretRef specifies the secret to use for obtaining + the StorageOS API credentials. If not specified, default + values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + volumeName: + description: volumeName is the human-readable name of the + StorageOS volume. Volume names are only unique within a + namespace. + type: string + volumeNamespace: + description: volumeNamespace specifies the scope of the volume + within StorageOS. If no namespace is specified then the + Pod's namespace will be used. This allows the Kubernetes + name scoping to be mirrored within StorageOS for tighter + integration. Set VolumeName to any name to override the + default behaviour. Set to "default" if you are not using + namespaces within StorageOS. Namespaces that do not pre-exist + within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: vsphereVolume represents a vSphere volume attached + and mounted on kubelets host machine + properties: + fsType: + description: fsType is filesystem type to mount. Must be a + filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + storagePolicyID: + description: storagePolicyID is the storage Policy Based Management + (SPBM) profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: storagePolicyName is the storage Policy Based + Management (SPBM) profile name. + type: string + volumePath: + description: volumePath is the path that identifies vSphere + volume vmdk + type: string + required: + - volumePath + type: object + type: object priorityClassName: description: PriorityClassName represents the pod's priority class. type: string @@ -20455,7 +22166,8 @@ spec: type: object type: array replicas: - description: Numbers of the Fluentd instance + description: Numbers of the Fluentd instance Applicable when the mode + is "collector", and will be ignored when the mode is "agent" format: int32 type: integer resources: @@ -20749,6 +22461,8 @@ spec: for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. + Applicable when the mode is "collector", and will be ignored when + the mode is "agent" items: description: PersistentVolumeClaim is a user's request for and claim to a persistent volume diff --git a/pkg/operator/fluentd-daemonset.go b/pkg/operator/fluentd-daemonset.go new file mode 100644 index 000000000..2fb58e95f --- /dev/null +++ b/pkg/operator/fluentd-daemonset.go @@ -0,0 +1,195 @@ +package operator + +import ( + "fmt" + + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + fluentdv1alpha1 "github.com/fluent/fluent-operator/v2/apis/fluentd/v1alpha1" +) + +func MakeFluentdDaemonSet(fd fluentdv1alpha1.Fluentd) *appsv1.DaemonSet { + + ports := makeFluentdPorts(fd) + + labels := map[string]string{ + "app.kubernetes.io/name": fd.Name, + "app.kubernetes.io/instance": "fluentd", + "app.kubernetes.io/component": "fluentd", + } + + if len(fd.Labels) > 0 { + for k, v := range fd.Labels { + if _, ok := labels[k]; !ok { + labels[k] = v + } + } + } + + daemonSet := appsv1.DaemonSet{ + ObjectMeta: metav1.ObjectMeta{ + Name: fd.Name, + Namespace: fd.Namespace, + Labels: labels, + Annotations: fd.Annotations, + }, + Spec: appsv1.DaemonSetSpec{ + Selector: &metav1.LabelSelector{ + MatchLabels: labels, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Name: fd.Name, + Namespace: fd.Namespace, + Labels: labels, + Annotations: fd.Spec.Annotations, + }, + Spec: corev1.PodSpec{ + ServiceAccountName: fd.Name, + ImagePullSecrets: fd.Spec.ImagePullSecrets, + Volumes: []corev1.Volume{ + { + Name: SecretVolName, + VolumeSource: corev1.VolumeSource{ + Secret: &corev1.SecretVolumeSource{ + SecretName: fmt.Sprintf("%s-config", fd.Name), + }, + }, + }, + { + Name: "varlogs", + VolumeSource: corev1.VolumeSource{ + HostPath: &corev1.HostPathVolumeSource{ + Path: "/var/log", + }, + }, + }, + { + Name: "systemd", + VolumeSource: corev1.VolumeSource{ + HostPath: &corev1.HostPathVolumeSource{ + Path: "/var/log/journal", + }, + }, + }, + }, + Containers: []corev1.Container{ + { + Name: "fluentd", + Image: fd.Spec.Image, + Args: fd.Spec.Args, + ImagePullPolicy: fd.Spec.ImagePullPolicy, + Ports: ports, + VolumeMounts: []corev1.VolumeMount{ + { + Name: SecretVolName, + ReadOnly: true, + MountPath: FluentdMountPath, + }, + { + Name: "varlogs", + ReadOnly: true, + MountPath: "/var/log/", + }, + { + Name: "systemd", + ReadOnly: true, + MountPath: "/var/log/journal", + }, + }, + Resources: fd.Spec.Resources, + Env: []corev1.EnvVar{ + { + Name: "BUFFER_PATH", + Value: BufferMountPath, + }, + }, + SecurityContext: fd.Spec.ContainerSecurityContext, + }, + }, + NodeSelector: fd.Spec.NodeSelector, + Tolerations: fd.Spec.Tolerations, + Affinity: fd.Spec.Affinity, + }, + }, + }, + } + + if fd.Spec.RuntimeClassName != "" { + daemonSet.Spec.Template.Spec.RuntimeClassName = &fd.Spec.RuntimeClassName + } + + if fd.Spec.PriorityClassName != "" { + daemonSet.Spec.Template.Spec.PriorityClassName = fd.Spec.PriorityClassName + } + + if fd.Spec.Volumes != nil { + daemonSet.Spec.Template.Spec.Volumes = append(daemonSet.Spec.Template.Spec.Volumes, fd.Spec.Volumes...) + } + + if fd.Spec.VolumeMounts != nil { + daemonSet.Spec.Template.Spec.Containers[0].VolumeMounts = append(daemonSet.Spec.Template.Spec.Containers[0].VolumeMounts, fd.Spec.VolumeMounts...) + } + + if fd.Spec.EnvVars != nil { + daemonSet.Spec.Template.Spec.Containers[0].Env = append(daemonSet.Spec.Template.Spec.Containers[0].Env, fd.Spec.EnvVars...) + } + + if fd.Spec.SecurityContext != nil { + daemonSet.Spec.Template.Spec.SecurityContext = fd.Spec.SecurityContext + } + + if fd.Spec.SchedulerName != "" { + daemonSet.Spec.Template.Spec.SchedulerName = fd.Spec.SchedulerName + } + + if fd.Spec.PositionDB != (corev1.VolumeSource{}) { + daemonSet.Spec.Template.Spec.Volumes = append(daemonSet.Spec.Template.Spec.Volumes, corev1.Volume{ + Name: "positions", + VolumeSource: fd.Spec.PositionDB, + }) + daemonSet.Spec.Template.Spec.Containers[0].VolumeMounts = append(daemonSet.Spec.Template.Spec.Containers[0].VolumeMounts, corev1.VolumeMount{ + Name: "positions", + MountPath: "/fluentd/tail", + }) + } + // Mount host or emptydir VolumeSource + if fd.Spec.BufferVolume != nil && !fd.Spec.BufferVolume.DisableBufferVolume { + bufferVolName := fmt.Sprintf("%s-buffer", fd.Name) + bufferpv := fd.Spec.BufferVolume + + if bufferpv.HostPath != nil { + daemonSet.Spec.Template.Spec.Volumes = append(daemonSet.Spec.Template.Spec.Volumes, corev1.Volume{ + Name: bufferVolName, + VolumeSource: corev1.VolumeSource{ + HostPath: bufferpv.HostPath, + }, + }) + + daemonSet.Spec.Template.Spec.Containers[0].VolumeMounts = append(daemonSet.Spec.Template.Spec.Containers[0].VolumeMounts, corev1.VolumeMount{ + Name: bufferVolName, + MountPath: BufferMountPath, + }) + return &daemonSet + } + + if bufferpv.EmptyDir != nil { + daemonSet.Spec.Template.Spec.Volumes = append(daemonSet.Spec.Template.Spec.Volumes, corev1.Volume{ + Name: bufferVolName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: bufferpv.EmptyDir, + }, + }) + + daemonSet.Spec.Template.Spec.Containers[0].VolumeMounts = append(daemonSet.Spec.Template.Spec.Containers[0].VolumeMounts, corev1.VolumeMount{ + Name: bufferVolName, + MountPath: BufferMountPath, + }) + + return &daemonSet + } + } + return &daemonSet +} diff --git a/pkg/operator/sts.go b/pkg/operator/sts.go index 6b8b00342..baa84c00c 100644 --- a/pkg/operator/sts.go +++ b/pkg/operator/sts.go @@ -31,13 +31,13 @@ const ( InputHttpType = "http" ) -func MakeStatefulset(fd fluentdv1alpha1.Fluentd) *appsv1.StatefulSet { +func MakeStatefulSet(fd fluentdv1alpha1.Fluentd) *appsv1.StatefulSet { replicas := *fd.Spec.Replicas if replicas == 0 { replicas = 1 } - ports := makeStatefulsetPorts(fd) + ports := makeFluentdPorts(fd) labels := map[string]string{ "app.kubernetes.io/name": fd.Name, @@ -201,7 +201,7 @@ func MakeStatefulset(fd fluentdv1alpha1.Fluentd) *appsv1.StatefulSet { return &sts } -func makeStatefulsetPorts(fd fluentdv1alpha1.Fluentd) []corev1.ContainerPort { +func makeFluentdPorts(fd fluentdv1alpha1.Fluentd) []corev1.ContainerPort { ports := []corev1.ContainerPort{ { Name: MetricsName,