Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: cleanup cluster-api-operator features in chart values #1023

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions charts/rancher-turtles/questions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ questions:
type: boolean
description: "Flag to enable or disable installation of cert-manager. If set to false then you will need to install cert-manager manually"
label: "Enable Cert Manager"
- variable: rancherTurtles.features.cluster-api-operator.cleanup
- variable: rancherTurtles.cluster-api-operator.cleanup
default: true
description: "Specify that the CAPI Operator post-delete cleanup job will be performed"
type: boolean
label: Cleanup CAPI Operator installation
group: "CAPI Operator cleanup settings"
show_subquestion_if: true
subquestions:
- variable: rancherTurtles.features.cluster-api-operator.kubectlImage
- 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
Expand Down
16 changes: 8 additions & 8 deletions charts/rancher-turtles/templates/post-delete-job.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if index .Values "rancherTurtles" "features" "cluster-api-operator" "cleanup" }}
{{- if index .Values "cluster-api-operator" "cleanup" }}
---
apiVersion: v1
kind: ServiceAccount
Expand Down Expand Up @@ -62,7 +62,7 @@ spec:
serviceAccountName: post-delete-job
containers:
- name: cluster-api-operator-mutatingwebhook-cleanup
image: {{ index .Values "rancherTurtles" "features" "cluster-api-operator" "kubectlImage" }}
image: {{ index .Values "cluster-api-operator" "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 "rancherTurtles" "features" "cluster-api-operator" "kubectlImage" }}
image: {{ index .Values "cluster-api-operator" "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 "rancherTurtles" "features" "cluster-api-operator" "kubectlImage" }}
image: {{ index .Values "cluster-api-operator" "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 "rancherTurtles" "features" "cluster-api-operator" "kubectlImage" }}
image: {{ index .Values "cluster-api-operator" "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 "rancherTurtles" "features" "cluster-api-operator" "kubectlImage" }}
image: {{ index .Values "cluster-api-operator" "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 "rancherTurtles" "features" "cluster-api-operator" "kubectlImage" }}
image: {{ index .Values "cluster-api-operator" "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 "rancherTurtles" "features" "cluster-api-operator" "kubectlImage" }}
image: {{ index .Values "cluster-api-operator" "kubectlImage" }}
command: ["kubectl"]
args:
- delete
Expand Down
5 changes: 2 additions & 3 deletions charts/rancher-turtles/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ rancherTurtles:
imagePullSecrets: []
rancherInstalled: true
features:
cluster-api-operator:
cleanup: true
kubectlImage: registry.k8s.io/kubernetes/kubectl:v1.30.0
embedded-capi:
disabled: true
rancher-webhook:
Expand Down Expand Up @@ -51,6 +48,8 @@ cluster-api-operator:
- mountPath: /config
name: clusterctl-config
readOnly: true
cleanup: true
kubectlImage: registry.k8s.io/kubernetes/kubectl:v1.30.0
cluster-api:
enabled: true
configSecret:
Expand Down
Loading