From b9ab2307783c1886c81b752fd35f4aaceefcf517 Mon Sep 17 00:00:00 2001 From: Bence Csati Date: Fri, 11 Oct 2024 14:50:45 +0200 Subject: [PATCH 1/2] feat: enable adding annotations and labels to pvcs Signed-off-by: Bence Csati --- ...xtensions.banzaicloud.io_eventtailers.yaml | 8 +++ ...ogging.banzaicloud.io_fluentbitagents.yaml | 24 +++++++ ...logging.banzaicloud.io_fluentdconfigs.yaml | 24 +++++++ .../crds/logging.banzaicloud.io_loggings.yaml | 64 +++++++++++++++++++ .../logging.banzaicloud.io_nodeagents.yaml | 16 +++++ ...xtensions.banzaicloud.io_eventtailers.yaml | 8 +++ ...ogging.banzaicloud.io_fluentbitagents.yaml | 24 +++++++ ...logging.banzaicloud.io_fluentdconfigs.yaml | 24 +++++++ .../logging.banzaicloud.io_loggings.yaml | 64 +++++++++++++++++++ .../logging.banzaicloud.io_nodeagents.yaml | 16 +++++ go.mod | 6 +- go.sum | 13 ++-- 12 files changed, 281 insertions(+), 10 deletions(-) diff --git a/charts/logging-operator/crds/logging-extensions.banzaicloud.io_eventtailers.yaml b/charts/logging-operator/crds/logging-extensions.banzaicloud.io_eventtailers.yaml index 09b96e41a..4cdc6c583 100644 --- a/charts/logging-operator/crds/logging-extensions.banzaicloud.io_eventtailers.yaml +++ b/charts/logging-operator/crds/logging-extensions.banzaicloud.io_eventtailers.yaml @@ -409,6 +409,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: diff --git a/charts/logging-operator/crds/logging.banzaicloud.io_fluentbitagents.yaml b/charts/logging-operator/crds/logging.banzaicloud.io_fluentbitagents.yaml index 8b0013970..937636572 100644 --- a/charts/logging-operator/crds/logging.banzaicloud.io_fluentbitagents.yaml +++ b/charts/logging-operator/crds/logging.banzaicloud.io_fluentbitagents.yaml @@ -551,6 +551,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: @@ -1934,6 +1942,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: @@ -2120,6 +2136,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: diff --git a/charts/logging-operator/crds/logging.banzaicloud.io_fluentdconfigs.yaml b/charts/logging-operator/crds/logging.banzaicloud.io_fluentdconfigs.yaml index b12b8fb45..4bc4f79f2 100644 --- a/charts/logging-operator/crds/logging.banzaicloud.io_fluentdconfigs.yaml +++ b/charts/logging-operator/crds/logging.banzaicloud.io_fluentdconfigs.yaml @@ -541,6 +541,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: @@ -1239,6 +1247,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: @@ -1444,6 +1460,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: diff --git a/charts/logging-operator/crds/logging.banzaicloud.io_loggings.yaml b/charts/logging-operator/crds/logging.banzaicloud.io_loggings.yaml index b660972b4..fec5ffd89 100644 --- a/charts/logging-operator/crds/logging.banzaicloud.io_loggings.yaml +++ b/charts/logging-operator/crds/logging.banzaicloud.io_loggings.yaml @@ -1598,6 +1598,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: @@ -2981,6 +2989,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: @@ -3167,6 +3183,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: @@ -4177,6 +4201,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: @@ -4875,6 +4907,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: @@ -5080,6 +5120,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: @@ -8026,6 +8074,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: @@ -12413,6 +12469,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: diff --git a/charts/logging-operator/crds/logging.banzaicloud.io_nodeagents.yaml b/charts/logging-operator/crds/logging.banzaicloud.io_nodeagents.yaml index 080df3d10..ac488db12 100644 --- a/charts/logging-operator/crds/logging.banzaicloud.io_nodeagents.yaml +++ b/charts/logging-operator/crds/logging.banzaicloud.io_nodeagents.yaml @@ -121,6 +121,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: @@ -4508,6 +4516,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: diff --git a/config/crd/bases/logging-extensions.banzaicloud.io_eventtailers.yaml b/config/crd/bases/logging-extensions.banzaicloud.io_eventtailers.yaml index 09b96e41a..4cdc6c583 100644 --- a/config/crd/bases/logging-extensions.banzaicloud.io_eventtailers.yaml +++ b/config/crd/bases/logging-extensions.banzaicloud.io_eventtailers.yaml @@ -409,6 +409,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: diff --git a/config/crd/bases/logging.banzaicloud.io_fluentbitagents.yaml b/config/crd/bases/logging.banzaicloud.io_fluentbitagents.yaml index 8b0013970..937636572 100644 --- a/config/crd/bases/logging.banzaicloud.io_fluentbitagents.yaml +++ b/config/crd/bases/logging.banzaicloud.io_fluentbitagents.yaml @@ -551,6 +551,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: @@ -1934,6 +1942,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: @@ -2120,6 +2136,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: diff --git a/config/crd/bases/logging.banzaicloud.io_fluentdconfigs.yaml b/config/crd/bases/logging.banzaicloud.io_fluentdconfigs.yaml index b12b8fb45..4bc4f79f2 100644 --- a/config/crd/bases/logging.banzaicloud.io_fluentdconfigs.yaml +++ b/config/crd/bases/logging.banzaicloud.io_fluentdconfigs.yaml @@ -541,6 +541,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: @@ -1239,6 +1247,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: @@ -1444,6 +1460,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: diff --git a/config/crd/bases/logging.banzaicloud.io_loggings.yaml b/config/crd/bases/logging.banzaicloud.io_loggings.yaml index b660972b4..fec5ffd89 100644 --- a/config/crd/bases/logging.banzaicloud.io_loggings.yaml +++ b/config/crd/bases/logging.banzaicloud.io_loggings.yaml @@ -1598,6 +1598,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: @@ -2981,6 +2989,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: @@ -3167,6 +3183,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: @@ -4177,6 +4201,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: @@ -4875,6 +4907,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: @@ -5080,6 +5120,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: @@ -8026,6 +8074,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: @@ -12413,6 +12469,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: diff --git a/config/crd/bases/logging.banzaicloud.io_nodeagents.yaml b/config/crd/bases/logging.banzaicloud.io_nodeagents.yaml index 080df3d10..ac488db12 100644 --- a/config/crd/bases/logging.banzaicloud.io_nodeagents.yaml +++ b/config/crd/bases/logging.banzaicloud.io_nodeagents.yaml @@ -121,6 +121,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: @@ -4508,6 +4516,14 @@ spec: type: object pvc: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object source: properties: claimName: diff --git a/go.mod b/go.mod index 5ddc77a83..b9ca0aa90 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( emperror.dev/errors v0.8.1 github.com/MakeNowJust/heredoc v1.0.0 github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 - github.com/cisco-open/operator-tools v0.36.0 + github.com/cisco-open/operator-tools v0.36.1-0.20241011092844-539087c4e686 github.com/go-logr/logr v1.4.2 github.com/kube-logging/logging-operator/pkg/sdk v0.11.0 github.com/kube-logging/logging-operator/pkg/sdk/logging/model/syslogng/config v0.0.0 @@ -55,7 +55,7 @@ require ( github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/iancoleman/orderedmap v0.3.0 // indirect - github.com/imdario/mergo v0.3.13 // indirect + github.com/imdario/mergo v0.3.16 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.17.9 // indirect @@ -71,7 +71,7 @@ require ( github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.55.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect - github.com/sergi/go-diff v1.1.0 // indirect + github.com/sergi/go-diff v1.2.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/wayneashleyberry/terminal-dimensions v1.1.0 // indirect github.com/x448/float16 v0.8.4 // indirect diff --git a/go.sum b/go.sum index 9c03748bb..5d44adabb 100644 --- a/go.sum +++ b/go.sum @@ -14,8 +14,8 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UF github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cisco-open/k8s-objectmatcher v1.10.0 h1:1TdhMPqVaU+NqECqytAkRF1SFU0QIMqrqbNTnTl933A= github.com/cisco-open/k8s-objectmatcher v1.10.0/go.mod h1:O/TFG3vW12jbKNQejpc8SGgSfujlaWYIOCZHcXeK514= -github.com/cisco-open/operator-tools v0.36.0 h1:CHh7OCq0NaBBRZ81K7LZZXqRLQmHpUIOIEaIcvhvlp8= -github.com/cisco-open/operator-tools v0.36.0/go.mod h1:BEDMB30mMN7ASmQjF3uPVy1fo0anp6Y0QKLtvN8rgZ8= +github.com/cisco-open/operator-tools v0.36.1-0.20241011092844-539087c4e686 h1:yHhBnv8H6LPWOzL9/PLA/qeJUjH4CVaoL3xgdkdSI/o= +github.com/cisco-open/operator-tools v0.36.1-0.20241011092844-539087c4e686/go.mod h1:SaMi2aMNILC5Wrqw9m92ptN5InMH2Zt3CSKkGlzyqfQ= github.com/cppforlife/go-patch v0.2.0 h1:Y14MnCQjDlbw7WXT4k+u6DPAA9XnygN4BfrSpI/19RU= github.com/cppforlife/go-patch v0.2.0/go.mod h1:67a7aIi94FHDZdoeGSJRRFDp66l9MhaAG1yGxpUoFD8= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -88,8 +88,8 @@ github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= -github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -154,8 +154,8 @@ github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0leargg github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= -github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/siliconbrain/go-seqs v0.13.0 h1:3xvOlPDs4FB/XZzmagMU/DTTbHhLcEVPsjauKHsT990= github.com/siliconbrain/go-seqs v0.13.0/go.mod h1:8kptI0u8epC1dPx/nCo3fUM2xJnfAoo59/UJiCsxkR4= github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w= @@ -268,7 +268,6 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= k8s.io/api v0.31.1 h1:Xe1hX/fPW3PXYYv8BlozYqw63ytA92snr96zMW9gWTU= From 8f585f5668c67416cc463dc333bb8d64b2327164 Mon Sep 17 00:00:00 2001 From: Bence Csati Date: Fri, 11 Oct 2024 16:41:11 +0200 Subject: [PATCH 2/2] chore: update controller-tools dep Signed-off-by: Bence Csati --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b9ca0aa90..f885ad94a 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( emperror.dev/errors v0.8.1 github.com/MakeNowJust/heredoc v1.0.0 github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 - github.com/cisco-open/operator-tools v0.36.1-0.20241011092844-539087c4e686 + github.com/cisco-open/operator-tools v0.37.0 github.com/go-logr/logr v1.4.2 github.com/kube-logging/logging-operator/pkg/sdk v0.11.0 github.com/kube-logging/logging-operator/pkg/sdk/logging/model/syslogng/config v0.0.0 diff --git a/go.sum b/go.sum index 5d44adabb..0116e9683 100644 --- a/go.sum +++ b/go.sum @@ -14,8 +14,8 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UF github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cisco-open/k8s-objectmatcher v1.10.0 h1:1TdhMPqVaU+NqECqytAkRF1SFU0QIMqrqbNTnTl933A= github.com/cisco-open/k8s-objectmatcher v1.10.0/go.mod h1:O/TFG3vW12jbKNQejpc8SGgSfujlaWYIOCZHcXeK514= -github.com/cisco-open/operator-tools v0.36.1-0.20241011092844-539087c4e686 h1:yHhBnv8H6LPWOzL9/PLA/qeJUjH4CVaoL3xgdkdSI/o= -github.com/cisco-open/operator-tools v0.36.1-0.20241011092844-539087c4e686/go.mod h1:SaMi2aMNILC5Wrqw9m92ptN5InMH2Zt3CSKkGlzyqfQ= +github.com/cisco-open/operator-tools v0.37.0 h1:qAkAbWQA+aeWHZOqpWL8FuiZ42cWWUZ0OmWfr3TBeGw= +github.com/cisco-open/operator-tools v0.37.0/go.mod h1:SaMi2aMNILC5Wrqw9m92ptN5InMH2Zt3CSKkGlzyqfQ= github.com/cppforlife/go-patch v0.2.0 h1:Y14MnCQjDlbw7WXT4k+u6DPAA9XnygN4BfrSpI/19RU= github.com/cppforlife/go-patch v0.2.0/go.mod h1:67a7aIi94FHDZdoeGSJRRFDp66l9MhaAG1yGxpUoFD8= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=