From d02800d7268940adb998b052c6337c465ce0e507 Mon Sep 17 00:00:00 2001 From: Carlos Salas Date: Wed, 22 Jan 2025 11:31:16 +0100 Subject: [PATCH] chore: remove feature rancher-webhook from chart Signed-off-by: Carlos Salas --- charts/rancher-turtles/questions.yml | 20 ++++++------------- .../templates/clusterctl-cm-cleanup-job.yaml | 4 ++-- .../templates/post-upgrade-job.yaml | 2 +- .../templates/pre-delete-job.yaml | 4 ++-- .../templates/pre-install-job.yaml | 6 +++--- charts/rancher-turtles/values.yaml | 4 +--- 6 files changed, 15 insertions(+), 25 deletions(-) diff --git a/charts/rancher-turtles/questions.yml b/charts/rancher-turtles/questions.yml index eec8692c..bc4c643f 100644 --- a/charts/rancher-turtles/questions.yml +++ b/charts/rancher-turtles/questions.yml @@ -27,20 +27,6 @@ questions: type: string label: Cleanup Image group: "CAPI Operator cleanup settings" - - variable: rancherTurtles.features.rancher-webhook.cleanup - default: true - description: "Specify that the Rancher embedded cluster api webhooks should be removed" - type: boolean - label: Cleanup Rancher Embedded CAPI Webhooks - group: "Rancher webhook cleanup settings" - show_subquestion_if: true - subquestions: - - variable: rancherTurtles.features.rancher-webhook.kubectlImage - default: "registry.k8s.io/kubernetes/kubectl:v1.30.0" - description: "Specify the image to use when cleaning up the webhooks" - type: string - label: Webhook Cleanup Image - group: "Rancher webhook cleanup settings" - variable: rancherTurtles.features.rancher-kubeconfigs.label default: false description: "(Experimental) Specify that the kubeconfigs generated by Rancher should be automatically patched to contain the CAPI expected labels" @@ -70,3 +56,9 @@ questions: type: boolean label: Enable Agent TLS Mode group: "Rancher Turtles Features Settings" + - variable: rancherTurtles.features.kubectlImage + default: "registry.k8s.io/kubernetes/kubectl:v1.30.0" + description: "Specify the image to use when running kubectl in jobs" + type: string + label: Kubectl Image + group: "Rancher Turtles Features Settings" diff --git a/charts/rancher-turtles/templates/clusterctl-cm-cleanup-job.yaml b/charts/rancher-turtles/templates/clusterctl-cm-cleanup-job.yaml index 3e46f9c1..a04df567 100644 --- a/charts/rancher-turtles/templates/clusterctl-cm-cleanup-job.yaml +++ b/charts/rancher-turtles/templates/clusterctl-cm-cleanup-job.yaml @@ -1,4 +1,4 @@ -{{- if index .Values "rancherTurtles" "features" "rancher-webhook" "cleanup" }} +{{- if index .Values "rancherTurtles" "rancherInstalled" }} --- apiVersion: v1 kind: ServiceAccount @@ -55,7 +55,7 @@ spec: serviceAccountName: pre-upgrade-job containers: - name: rancher-clusterctl-configmap-cleanup - image: {{ index .Values "rancherTurtles" "features" "rancher-webhook" "kubectlImage" }} + image: {{ index .Values "rancherTurtles" "features" "kubectlImage" }} args: - delete - configmap diff --git a/charts/rancher-turtles/templates/post-upgrade-job.yaml b/charts/rancher-turtles/templates/post-upgrade-job.yaml index fdc61dfd..9ebecfdb 100644 --- a/charts/rancher-turtles/templates/post-upgrade-job.yaml +++ b/charts/rancher-turtles/templates/post-upgrade-job.yaml @@ -62,7 +62,7 @@ spec: serviceAccountName: post-upgrade-job containers: - name: post-upgrade-delete-clusters - image: {{ index .Values "rancherTurtles" "features" "rancher-webhook" "kubectlImage" }} + image: {{ index .Values "rancherTurtles" "features" "kubectlImage" }} args: - delete - clusters.management.cattle.io diff --git a/charts/rancher-turtles/templates/pre-delete-job.yaml b/charts/rancher-turtles/templates/pre-delete-job.yaml index 1138ba34..bb164aa1 100644 --- a/charts/rancher-turtles/templates/pre-delete-job.yaml +++ b/charts/rancher-turtles/templates/pre-delete-job.yaml @@ -1,4 +1,4 @@ -{{- if index .Values "rancherTurtles" "features" "rancher-webhook" "cleanup" }} +{{- if index .Values "rancherTurtles" "rancherInstalled" }} --- apiVersion: v1 kind: ServiceAccount @@ -56,7 +56,7 @@ spec: serviceAccountName: pre-delete-job containers: - name: rancher-capiprovider-cleanup - image: {{ index .Values "rancherTurtles" "features" "rancher-webhook" "kubectlImage" }} + image: {{ index .Values "rancherTurtles" "features" "kubectlImage" }} args: - delete - capiproviders diff --git a/charts/rancher-turtles/templates/pre-install-job.yaml b/charts/rancher-turtles/templates/pre-install-job.yaml index 640e85d9..2393d30f 100644 --- a/charts/rancher-turtles/templates/pre-install-job.yaml +++ b/charts/rancher-turtles/templates/pre-install-job.yaml @@ -10,7 +10,7 @@ metadata: spec: value: false {{- end }} -{{- if index .Values "rancherTurtles" "features" "rancher-webhook" "cleanup" }} +{{- if index .Values "rancherTurtles" "rancherInstalled" }} --- apiVersion: v1 kind: ServiceAccount @@ -68,7 +68,7 @@ spec: serviceAccountName: pre-install-job containers: - name: rancher-mutatingwebhook-cleanup - image: {{ index .Values "rancherTurtles" "features" "rancher-webhook" "kubectlImage" }} + image: {{ index .Values "rancherTurtles" "features" "kubectlImage" }} args: - delete - mutatingwebhookconfigurations.admissionregistration.k8s.io @@ -91,7 +91,7 @@ spec: serviceAccountName: pre-install-job containers: - name: rancher-validatingwebhook-cleanup - image: {{ index .Values "rancherTurtles" "features" "rancher-webhook" "kubectlImage" }} + image: {{ index .Values "rancherTurtles" "features" "kubectlImage" }} args: - delete - validatingwebhookconfigurations.admissionregistration.k8s.io diff --git a/charts/rancher-turtles/values.yaml b/charts/rancher-turtles/values.yaml index 78ef0523..69890c75 100644 --- a/charts/rancher-turtles/values.yaml +++ b/charts/rancher-turtles/values.yaml @@ -7,9 +7,6 @@ rancherTurtles: imagePullSecrets: [] rancherInstalled: true features: - rancher-webhook: - cleanup: true - kubectlImage: registry.k8s.io/kubernetes/kubectl:v1.30.0 rancher-kubeconfigs: label: false propagate-labels: @@ -23,6 +20,7 @@ rancherTurtles: enabled: true agent-tls-mode: enabled: false + kubectlImage: registry.k8s.io/kubernetes/kubectl:v1.30.0 cluster-api-operator: enabled: true cert-manager: