From dfdf080635ef68c45a2bf50b6d58f56a11ec59b6 Mon Sep 17 00:00:00 2001 From: suryapandian Date: Thu, 6 Jun 2024 14:25:18 +0100 Subject: [PATCH 1/6] add support for annotations for the source and kustomize controller deployments Signed-off-by: suryapandian --- charts/flux2/templates/kustomize-controller.yaml | 4 ++++ charts/flux2/templates/source-controller.yaml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/charts/flux2/templates/kustomize-controller.yaml b/charts/flux2/templates/kustomize-controller.yaml index fff3ed0..17b0b3f 100644 --- a/charts/flux2/templates/kustomize-controller.yaml +++ b/charts/flux2/templates/kustomize-controller.yaml @@ -13,6 +13,10 @@ metadata: {{- with .Values.kustomizeController.labels }} {{- . | toYaml | nindent 4 }} {{- end }} + annotations: + {{- with .Values.kustomizeController.annotations }} + {{- . | toYaml | nindent 4 }} + {{- end }} name: kustomize-controller spec: {{- if kindIs "invalid" .Values.kustomizeController.replicas }} diff --git a/charts/flux2/templates/source-controller.yaml b/charts/flux2/templates/source-controller.yaml index 46c7cfe..7d82f4d 100644 --- a/charts/flux2/templates/source-controller.yaml +++ b/charts/flux2/templates/source-controller.yaml @@ -13,6 +13,10 @@ metadata: {{- with .Values.sourceController.labels }} {{- . | toYaml | nindent 4 }} {{- end }} + annotations: + {{- with .Values.sourceController.annotations }} + {{- . | toYaml | nindent 4 }} + {{- end }} name: source-controller spec: replicas: 1 From 4d5dd337787942009c18446786e06aa2530c42a8 Mon Sep 17 00:00:00 2001 From: suryapandian Date: Thu, 6 Jun 2024 14:31:36 +0100 Subject: [PATCH 2/6] bump chart version Signed-off-by: suryapandian --- charts/flux2/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/flux2/Chart.yaml b/charts/flux2/Chart.yaml index 98bdaa3..e8002c9 100644 --- a/charts/flux2/Chart.yaml +++ b/charts/flux2/Chart.yaml @@ -8,4 +8,4 @@ name: flux2 sources: - https://github.com/fluxcd-community/helm-charts type: application -version: 2.13.0 +version: 2.13.1 From ed489b43406daca73c972cb97bd35193aaeab358 Mon Sep 17 00:00:00 2001 From: suryapandian Date: Thu, 6 Jun 2024 14:35:32 +0100 Subject: [PATCH 3/6] bump badge Signed-off-by: suryapandian --- charts/flux2/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/flux2/README.md b/charts/flux2/README.md index c202c6f..a69f78f 100644 --- a/charts/flux2/README.md +++ b/charts/flux2/README.md @@ -1,6 +1,6 @@ # flux2 -![Version: 2.13.0](https://img.shields.io/badge/Version-2.13.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.3.0](https://img.shields.io/badge/AppVersion-2.3.0-informational?style=flat-square) +![Version: 2.13.1](https://img.shields.io/badge/Version-2.13.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.3.0](https://img.shields.io/badge/AppVersion-2.3.0-informational?style=flat-square) A Helm chart for flux2 From d6ab76d63bdcf909af5d6799cc29770a240fa65a Mon Sep 17 00:00:00 2001 From: suryapandian Date: Mon, 10 Jun 2024 10:25:14 +0100 Subject: [PATCH 4/6] version bumps in charts Signed-off-by: suryapandian --- .../flux2/tests/__snapshot__/helm-controller_test.yaml.snap | 2 +- .../__snapshot__/image-automation-controller_test.yaml.snap | 2 +- .../__snapshot__/image-reflector-controller_test.yaml.snap | 2 +- .../__snapshot__/kustomize-controller-secret_test.yaml.snap | 2 +- .../tests/__snapshot__/kustomize-controller_test.yaml.snap | 2 +- .../tests/__snapshot__/notification-controller_test.yaml.snap | 2 +- .../flux2/tests/__snapshot__/pre-install-job_test.yaml.snap | 4 ++-- .../flux2/tests/__snapshot__/source-controller_test.yaml.snap | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/charts/flux2/tests/__snapshot__/helm-controller_test.yaml.snap b/charts/flux2/tests/__snapshot__/helm-controller_test.yaml.snap index c1f840f..bfea2a1 100644 --- a/charts/flux2/tests/__snapshot__/helm-controller_test.yaml.snap +++ b/charts/flux2/tests/__snapshot__/helm-controller_test.yaml.snap @@ -10,7 +10,7 @@ should match snapshot of default values: app.kubernetes.io/part-of: flux app.kubernetes.io/version: 2.3.0 control-plane: controller - helm.sh/chart: flux2-2.13.0 + helm.sh/chart: flux2-2.13.1 labeltestkey: labeltestvalue labeltestkey2: labeltestvalue2 name: helm-controller diff --git a/charts/flux2/tests/__snapshot__/image-automation-controller_test.yaml.snap b/charts/flux2/tests/__snapshot__/image-automation-controller_test.yaml.snap index abb2217..2e5c923 100644 --- a/charts/flux2/tests/__snapshot__/image-automation-controller_test.yaml.snap +++ b/charts/flux2/tests/__snapshot__/image-automation-controller_test.yaml.snap @@ -10,7 +10,7 @@ should match snapshot of default values: app.kubernetes.io/part-of: flux app.kubernetes.io/version: 2.3.0 control-plane: controller - helm.sh/chart: flux2-2.13.0 + helm.sh/chart: flux2-2.13.1 name: image-automation-controller spec: replicas: 1 diff --git a/charts/flux2/tests/__snapshot__/image-reflector-controller_test.yaml.snap b/charts/flux2/tests/__snapshot__/image-reflector-controller_test.yaml.snap index bc43cdd..5f2e3f3 100644 --- a/charts/flux2/tests/__snapshot__/image-reflector-controller_test.yaml.snap +++ b/charts/flux2/tests/__snapshot__/image-reflector-controller_test.yaml.snap @@ -10,7 +10,7 @@ should match snapshot of default values: app.kubernetes.io/part-of: flux app.kubernetes.io/version: 2.3.0 control-plane: controller - helm.sh/chart: flux2-2.13.0 + helm.sh/chart: flux2-2.13.1 name: image-reflector-controller spec: replicas: 1 diff --git a/charts/flux2/tests/__snapshot__/kustomize-controller-secret_test.yaml.snap b/charts/flux2/tests/__snapshot__/kustomize-controller-secret_test.yaml.snap index d343f3d..bec23d3 100644 --- a/charts/flux2/tests/__snapshot__/kustomize-controller-secret_test.yaml.snap +++ b/charts/flux2/tests/__snapshot__/kustomize-controller-secret_test.yaml.snap @@ -10,7 +10,7 @@ should match snapshot of default values: app.kubernetes.io/managed-by: Helm app.kubernetes.io/part-of: flux app.kubernetes.io/version: 2.3.0 - helm.sh/chart: flux2-2.13.0 + helm.sh/chart: flux2-2.13.1 name: test1 namespace: NAMESPACE type: Opaque diff --git a/charts/flux2/tests/__snapshot__/kustomize-controller_test.yaml.snap b/charts/flux2/tests/__snapshot__/kustomize-controller_test.yaml.snap index bca8726..b4abe71 100644 --- a/charts/flux2/tests/__snapshot__/kustomize-controller_test.yaml.snap +++ b/charts/flux2/tests/__snapshot__/kustomize-controller_test.yaml.snap @@ -10,7 +10,7 @@ should match snapshot of default values: app.kubernetes.io/part-of: flux app.kubernetes.io/version: 2.3.0 control-plane: controller - helm.sh/chart: flux2-2.13.0 + helm.sh/chart: flux2-2.13.1 name: kustomize-controller spec: replicas: 1 diff --git a/charts/flux2/tests/__snapshot__/notification-controller_test.yaml.snap b/charts/flux2/tests/__snapshot__/notification-controller_test.yaml.snap index ca6c0e6..d716dc2 100644 --- a/charts/flux2/tests/__snapshot__/notification-controller_test.yaml.snap +++ b/charts/flux2/tests/__snapshot__/notification-controller_test.yaml.snap @@ -10,7 +10,7 @@ should match snapshot of default values: app.kubernetes.io/part-of: flux app.kubernetes.io/version: 2.3.0 control-plane: controller - helm.sh/chart: flux2-2.13.0 + helm.sh/chart: flux2-2.13.1 name: notification-controller spec: replicas: 1 diff --git a/charts/flux2/tests/__snapshot__/pre-install-job_test.yaml.snap b/charts/flux2/tests/__snapshot__/pre-install-job_test.yaml.snap index 74745a7..2361c8c 100644 --- a/charts/flux2/tests/__snapshot__/pre-install-job_test.yaml.snap +++ b/charts/flux2/tests/__snapshot__/pre-install-job_test.yaml.snap @@ -12,7 +12,7 @@ should match snapshot of default values: app.kubernetes.io/managed-by: Helm app.kubernetes.io/part-of: flux app.kubernetes.io/version: 2.3.0 - helm.sh/chart: flux2-2.13.0 + helm.sh/chart: flux2-2.13.1 name: RELEASE-NAME-flux-check spec: backoffLimit: 1 @@ -23,7 +23,7 @@ should match snapshot of default values: app.kubernetes.io/managed-by: Helm app.kubernetes.io/part-of: flux app.kubernetes.io/version: 2.3.0 - helm.sh/chart: flux2-2.13.0 + helm.sh/chart: flux2-2.13.1 name: RELEASE-NAME spec: automountServiceAccountToken: true diff --git a/charts/flux2/tests/__snapshot__/source-controller_test.yaml.snap b/charts/flux2/tests/__snapshot__/source-controller_test.yaml.snap index 5987b8c..5a92abf 100644 --- a/charts/flux2/tests/__snapshot__/source-controller_test.yaml.snap +++ b/charts/flux2/tests/__snapshot__/source-controller_test.yaml.snap @@ -10,7 +10,7 @@ should match snapshot of default values: app.kubernetes.io/part-of: flux app.kubernetes.io/version: 2.3.0 control-plane: controller - helm.sh/chart: flux2-2.13.0 + helm.sh/chart: flux2-2.13.1 name: source-controller spec: replicas: 1 From bfb2ba4e9335e9f78ad3cf0933e8b5fe36957514 Mon Sep 17 00:00:00 2001 From: suryapandian Date: Mon, 10 Jun 2024 19:18:24 +0100 Subject: [PATCH 5/6] use seperate keys for deploymentAnnotation Signed-off-by: suryapandian --- charts/flux2/README.md | 2 ++ charts/flux2/templates/kustomize-controller.yaml | 2 +- charts/flux2/templates/source-controller.yaml | 2 +- charts/flux2/values.yaml | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/charts/flux2/README.md b/charts/flux2/README.md index a69f78f..843116a 100644 --- a/charts/flux2/README.md +++ b/charts/flux2/README.md @@ -88,6 +88,7 @@ This helm chart is maintained and released by the fluxcd-community on a best eff | kustomizeController.annotations."prometheus.io/scrape" | string | `"true"` | | | kustomizeController.container.additionalArgs | list | `[]` | | | kustomizeController.create | bool | `true` | | +| kustomizeController.deploymentAnnotations | object | `{}` | | | kustomizeController.envFrom | object | `{"map":{"name":""},"secret":{"name":""}}` | Defines envFrom using a configmap and/or secret. | | kustomizeController.extraEnv | list | `[]` | | | kustomizeController.extraSecretMounts | list | `[]` | Defines additional mounts with secrets. Secrets must be manually created in the namespace or with kustomizeController.secret | @@ -156,6 +157,7 @@ This helm chart is maintained and released by the fluxcd-community on a best eff | sourceController.annotations."prometheus.io/scrape" | string | `"true"` | | | sourceController.container.additionalArgs | list | `[]` | | | sourceController.create | bool | `true` | | +| sourceController.deploymentAnnotations | object | `{}` | | | sourceController.extraEnv | list | `[]` | | | sourceController.image | string | `"ghcr.io/fluxcd/source-controller"` | | | sourceController.imagePullPolicy | string | `""` | | diff --git a/charts/flux2/templates/kustomize-controller.yaml b/charts/flux2/templates/kustomize-controller.yaml index 17b0b3f..bbb5d3d 100644 --- a/charts/flux2/templates/kustomize-controller.yaml +++ b/charts/flux2/templates/kustomize-controller.yaml @@ -14,7 +14,7 @@ metadata: {{- . | toYaml | nindent 4 }} {{- end }} annotations: - {{- with .Values.kustomizeController.annotations }} + {{- with .Values.kustomizeController.deploymentAnnotations }} {{- . | toYaml | nindent 4 }} {{- end }} name: kustomize-controller diff --git a/charts/flux2/templates/source-controller.yaml b/charts/flux2/templates/source-controller.yaml index 7d82f4d..ca0191a 100644 --- a/charts/flux2/templates/source-controller.yaml +++ b/charts/flux2/templates/source-controller.yaml @@ -14,7 +14,7 @@ metadata: {{- . | toYaml | nindent 4 }} {{- end }} annotations: - {{- with .Values.sourceController.annotations }} + {{- with .Values.sourceController.deploymentAnnotations }} {{- . | toYaml | nindent 4 }} {{- end }} name: source-controller diff --git a/charts/flux2/values.yaml b/charts/flux2/values.yaml index 6a023c7..416d1c9 100644 --- a/charts/flux2/values.yaml +++ b/charts/flux2/values.yaml @@ -152,6 +152,7 @@ kustomizeController: annotations: prometheus.io/port: "8080" prometheus.io/scrape: "true" + deploymentAnnotations: {} labels: {} container: additionalArgs: [] @@ -253,6 +254,7 @@ sourceController: annotations: prometheus.io/port: "8080" prometheus.io/scrape: "true" + deploymentAnnotations: {} labels: {} container: additionalArgs: [] From a9854b496272d21c740d4aaf27ed2fdc5351a6fb Mon Sep 17 00:00:00 2001 From: suryapandian Date: Mon, 10 Jun 2024 19:20:20 +0100 Subject: [PATCH 6/6] indentation fix Signed-off-by: suryapandian --- charts/flux2/templates/kustomize-controller.yaml | 4 ++-- charts/flux2/templates/source-controller.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/flux2/templates/kustomize-controller.yaml b/charts/flux2/templates/kustomize-controller.yaml index bbb5d3d..6ec7aa0 100644 --- a/charts/flux2/templates/kustomize-controller.yaml +++ b/charts/flux2/templates/kustomize-controller.yaml @@ -13,10 +13,10 @@ metadata: {{- with .Values.kustomizeController.labels }} {{- . | toYaml | nindent 4 }} {{- end }} + {{- with .Values.kustomizeController.deploymentAnnotations }} annotations: - {{- with .Values.kustomizeController.deploymentAnnotations }} {{- . | toYaml | nindent 4 }} - {{- end }} + {{- end }} name: kustomize-controller spec: {{- if kindIs "invalid" .Values.kustomizeController.replicas }} diff --git a/charts/flux2/templates/source-controller.yaml b/charts/flux2/templates/source-controller.yaml index ca0191a..f35e1cd 100644 --- a/charts/flux2/templates/source-controller.yaml +++ b/charts/flux2/templates/source-controller.yaml @@ -13,10 +13,10 @@ metadata: {{- with .Values.sourceController.labels }} {{- . | toYaml | nindent 4 }} {{- end }} + {{- with .Values.sourceController.deploymentAnnotations }} annotations: - {{- with .Values.sourceController.deploymentAnnotations }} {{- . | toYaml | nindent 4 }} - {{- end }} + {{- end }} name: source-controller spec: replicas: 1