Skip to content

Commit

Permalink
chore: remove feature rancher-webhook from chart
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Salas <[email protected]>
  • Loading branch information
salasberryfin committed Jan 22, 2025
1 parent 459824b commit 30e5e8c
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 41 deletions.
28 changes: 6 additions & 22 deletions charts/rancher-turtles/questions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,6 @@ questions:
type: boolean
label: Cleanup CAPI Operator installation
group: "CAPI Operator cleanup settings"
show_subquestion_if: true
subquestions:
- variable: rancherTurtles.cluster-api-operator.kubectlImage
default: "registry.k8s.io/kubernetes/kubectl:v1.30.0"
description: "Specify the image to use when cleaning up the Cluster API Operator manifests"
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"
Expand All @@ -64,3 +42,9 @@ questions:
type: boolean
label: Enable Agent TLS Mode
group: "Rancher Turtles Features Settings"
- variable: rancherTurtles.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"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if index .Values "rancherTurtles" "features" "rancher-webhook" "cleanup" }}
{{- if index .Values "rancherTurtles" "rancherInstalled" }}
---
apiVersion: v1
kind: ServiceAccount
Expand Down Expand Up @@ -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" "kubectlImage" }}
args:
- delete
- configmap
Expand Down
14 changes: 7 additions & 7 deletions charts/rancher-turtles/templates/post-delete-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ spec:
serviceAccountName: post-delete-job
containers:
- name: cluster-api-operator-mutatingwebhook-cleanup
image: {{ index .Values "cluster-api-operator" "kubectlImage" }}
image: {{ index .Values "rancherTurtles" "kubectlImage" }}
command: ["kubectl"]
args:
- delete
Expand Down Expand Up @@ -90,7 +90,7 @@ spec:
serviceAccountName: post-delete-job
containers:
- name: cluster-api-operator-validatingwebhook-cleanup
image: {{ index .Values "cluster-api-operator" "kubectlImage" }}
image: {{ index .Values "rancherTurtles" "kubectlImage" }}
command: ["kubectl"]
args:
- delete
Expand Down Expand Up @@ -119,7 +119,7 @@ spec:
restartPolicy: Never
containers:
- name: delete-capi-controller-manager
image: {{ index .Values "cluster-api-operator" "kubectlImage" }}
image: {{ index .Values "rancherTurtles" "kubectlImage" }}
command: ["kubectl"]
args:
- delete
Expand All @@ -128,7 +128,7 @@ spec:
- {{ index .Values "cluster-api-operator" "cluster-api" "core" "namespace" }}
- --ignore-not-found=true
- name: delete-capi-kubeadm-bootstrap-controller-manager
image: {{ index .Values "cluster-api-operator" "kubectlImage" }}
image: {{ index .Values "rancherTurtles" "kubectlImage" }}
command: ["kubectl"]
args:
- delete
Expand All @@ -137,7 +137,7 @@ spec:
- capi-kubeadm-bootstrap-system
- --ignore-not-found=true
- name: delete-capi-kubeadm-control-plane-controller-manager
image: {{ index .Values "cluster-api-operator" "kubectlImage" }}
image: {{ index .Values "rancherTurtles" "kubectlImage" }}
command: ["kubectl"]
args:
- delete
Expand All @@ -146,7 +146,7 @@ spec:
- capi-kubeadm-control-plane-system
- --ignore-not-found=true
- name: delete-rke2-kubeadm-bootstrap-controller-manager
image: {{ index .Values "cluster-api-operator" "kubectlImage" }}
image: {{ index .Values "rancherTurtles" "kubectlImage" }}
command: ["kubectl"]
args:
- delete
Expand All @@ -155,7 +155,7 @@ spec:
- {{ index .Values "cluster-api-operator" "cluster-api" "rke2" "bootstrap" "namespace" }}
- --ignore-not-found=true
- name: delete-rke2-control-plane-controller-manager
image: {{ index .Values "cluster-api-operator" "kubectlImage" }}
image: {{ index .Values "rancherTurtles" "kubectlImage" }}
command: ["kubectl"]
args:
- delete
Expand Down
2 changes: 1 addition & 1 deletion charts/rancher-turtles/templates/post-upgrade-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" "kubectlImage" }}
args:
- delete
- clusters.management.cattle.io
Expand Down
4 changes: 2 additions & 2 deletions charts/rancher-turtles/templates/pre-delete-job.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if index .Values "rancherTurtles" "features" "rancher-webhook" "cleanup" }}
{{- if index .Values "rancherTurtles" "rancherInstalled" }}
---
apiVersion: v1
kind: ServiceAccount
Expand Down Expand Up @@ -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" "kubectlImage" }}
args:
- delete
- capiproviders
Expand Down
6 changes: 3 additions & 3 deletions charts/rancher-turtles/templates/pre-install-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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" "kubectlImage" }}
args:
- delete
- mutatingwebhookconfigurations.admissionregistration.k8s.io
Expand All @@ -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" "kubectlImage" }}
args:
- delete
- validatingwebhookconfigurations.admissionregistration.k8s.io
Expand Down
5 changes: 1 addition & 4 deletions charts/rancher-turtles/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ rancherTurtles:
managerArguments: []
imagePullSecrets: []
rancherInstalled: true
kubectlImage: registry.k8s.io/kubernetes/kubectl:v1.30.0
features:
rancher-webhook:
cleanup: true
kubectlImage: registry.k8s.io/kubernetes/kubectl:v1.30.0
rancher-kubeconfigs:
label: false
etcd-snapshot-restore:
Expand Down Expand Up @@ -45,7 +43,6 @@ cluster-api-operator:
name: clusterctl-config
readOnly: true
cleanup: true
kubectlImage: registry.k8s.io/kubernetes/kubectl:v1.30.0
cluster-api:
enabled: true
configSecret:
Expand Down

0 comments on commit 30e5e8c

Please sign in to comment.