From 638d8454c96c981884b7c7a8f0dc6d0bfcf35cf5 Mon Sep 17 00:00:00 2001 From: alvarocabanas Date: Thu, 24 Jul 2025 09:29:44 +0200 Subject: [PATCH] feat(flux2): allow skipping the pre-install checks Signed-off-by: alvarocabanas --- charts/flux2/Chart.yaml | 4 ++-- charts/flux2/README.md | 1 + charts/flux2/templates/pre-install-job-serviceaccount.yaml | 2 ++ charts/flux2/templates/pre-install-job.yaml | 2 ++ charts/flux2/values.yaml | 3 +++ 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/charts/flux2/Chart.yaml b/charts/flux2/Chart.yaml index 5432d058..17ba50e9 100644 --- a/charts/flux2/Chart.yaml +++ b/charts/flux2/Chart.yaml @@ -1,6 +1,6 @@ annotations: artifacthub.io/changes: | - - "[Chore]: Update App Version to upstream 2.6.4" + - "[feat(flux2)]: allow skipping the pre-install checks" apiVersion: v2 appVersion: 2.6.4 description: A Helm chart for flux2 @@ -8,4 +8,4 @@ name: flux2 sources: - https://github.com/fluxcd-community/helm-charts type: application -version: 2.16.3 +version: 2.17.0 diff --git a/charts/flux2/README.md b/charts/flux2/README.md index 01e74b1b..00c65223 100644 --- a/charts/flux2/README.md +++ b/charts/flux2/README.md @@ -142,6 +142,7 @@ This helm chart is maintained and released by the fluxcd-community on a best eff | notificationController.webhookReceiver.service.annotations | object | `{}` | | | notificationController.webhookReceiver.service.labels | object | `{}` | | | policies.create | bool | `true` | | +| preInstallChecks | bool | `true` | allows to skip the pre-install checks when disabled | | prometheus.podMonitor.create | bool | `false` | Enables podMonitor endpoint | | prometheus.podMonitor.podMetricsEndpoints[0].port | string | `"http-prom"` | | | prometheus.podMonitor.podMetricsEndpoints[0].relabelings[0].action | string | `"keep"` | | diff --git a/charts/flux2/templates/pre-install-job-serviceaccount.yaml b/charts/flux2/templates/pre-install-job-serviceaccount.yaml index f6348698..cc5a8d6d 100644 --- a/charts/flux2/templates/pre-install-job-serviceaccount.yaml +++ b/charts/flux2/templates/pre-install-job-serviceaccount.yaml @@ -1,3 +1,4 @@ +{{- if .Values.preInstallChecks -}} apiVersion: v1 kind: ServiceAccount metadata: @@ -12,3 +13,4 @@ metadata: "helm.sh/hook": pre-install "helm.sh/hook-weight": "-10" "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded +{{- end }} \ No newline at end of file diff --git a/charts/flux2/templates/pre-install-job.yaml b/charts/flux2/templates/pre-install-job.yaml index 2c2541f5..1fc48e12 100644 --- a/charts/flux2/templates/pre-install-job.yaml +++ b/charts/flux2/templates/pre-install-job.yaml @@ -1,3 +1,4 @@ +{{- if .Values.preInstallChecks -}} apiVersion: batch/v1 kind: Job metadata: @@ -70,3 +71,4 @@ spec: {{- with .Values.cli.tolerations }} tolerations: {{ toYaml . | nindent 8 }} {{- end }} +{{- end }} diff --git a/charts/flux2/values.yaml b/charts/flux2/values.yaml index 36f64ada..92bc7590 100644 --- a/charts/flux2/values.yaml +++ b/charts/flux2/values.yaml @@ -21,6 +21,9 @@ multitenancy: clusterDomain: cluster.local +# -- allows to skip the pre-install checks when disabled +preInstallChecks: true + cli: image: ghcr.io/fluxcd/flux-cli tag: v2.6.4