Skip to content

Commit 105f853

Browse files
Merge pull request #1895 from salasberryfin/deprecate-rancher-kubectl-image
switch deprecated rancher/kubectl image to rancher/kuberlr-kubectl
2 parents 76682f3 + 76af659 commit 105f853

File tree

6 files changed

+73
-82
lines changed

6 files changed

+73
-82
lines changed

charts/rancher-turtles/questions.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,3 @@ questions:
3131
type: boolean
3232
label: Remove cert-manager
3333
group: "Rancher Turtles Features Settings"
34-
- variable: kubectlImage
35-
default: "registry.k8s.io/kubernetes/kubectl:v1.34.1"
36-
description: "Specify the image to use when running kubectl in jobs."
37-
type: string
38-
label: Kubectl Image
39-
group: "Rancher Turtles Features Settings"

charts/rancher-turtles/templates/clusterctl-cm-cleanup-job.yaml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -54,22 +54,23 @@ spec:
5454
spec:
5555
serviceAccountName: pre-upgrade-job
5656
containers:
57-
- name: rancher-clusterctl-configmap-cleanup
58-
image: {{ .Values.kubectlImage }}
59-
args:
60-
- delete
61-
- configmap
62-
- --namespace={{ .Values.namespace }}
63-
- clusterctl-config
64-
- --ignore-not-found=true
65-
securityContext:
66-
seccompProfile:
67-
type: RuntimeDefault
68-
allowPrivilegeEscalation: false
69-
capabilities:
70-
drop:
71-
- ALL
72-
runAsNonRoot: true
73-
runAsUser: 1000
57+
- name: rancher-clusterctl-configmap-cleanup
58+
image: {{ .Values.shellImage }}
59+
command: ["kubectl"]
60+
args:
61+
- delete
62+
- configmap
63+
- --namespace={{ .Values.namespace }}
64+
- clusterctl-config
65+
- --ignore-not-found=true
66+
securityContext:
67+
seccompProfile:
68+
type: RuntimeDefault
69+
allowPrivilegeEscalation: false
70+
capabilities:
71+
drop:
72+
- ALL
73+
runAsNonRoot: true
74+
runAsUser: 1000
7475
restartPolicy: Never
7576
{{- end }}

charts/rancher-turtles/templates/post-delete-job.yaml

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -61,23 +61,23 @@ spec:
6161
spec:
6262
serviceAccountName: post-delete-job
6363
containers:
64-
- name: cluster-api-operator-mutatingwebhook-cleanup
65-
image: {{ .Values.kubectlImage }}
66-
command: ["kubectl"]
67-
args:
68-
- delete
69-
- mutatingwebhookconfigurations.admissionregistration.k8s.io
70-
- capi-mutating-webhook-configuration
71-
- --ignore-not-found=true
72-
securityContext:
73-
seccompProfile:
74-
type: RuntimeDefault
75-
allowPrivilegeEscalation: false
76-
capabilities:
77-
drop:
78-
- ALL
79-
runAsNonRoot: true
80-
runAsUser: 1000
64+
- name: cluster-api-operator-mutatingwebhook-cleanup
65+
image: {{ .Values.shellImage }}
66+
command: ["kubectl"]
67+
args:
68+
- delete
69+
- mutatingwebhookconfigurations.admissionregistration.k8s.io
70+
- capi-mutating-webhook-configuration
71+
- --ignore-not-found=true
72+
securityContext:
73+
seccompProfile:
74+
type: RuntimeDefault
75+
allowPrivilegeEscalation: false
76+
capabilities:
77+
drop:
78+
- ALL
79+
runAsNonRoot: true
80+
runAsUser: 1000
8181
restartPolicy: Never
8282
---
8383
apiVersion: batch/v1
@@ -94,23 +94,23 @@ spec:
9494
spec:
9595
serviceAccountName: post-delete-job
9696
containers:
97-
- name: cluster-api-operator-validatingwebhook-cleanup
98-
image: {{ .Values.kubectlImage }}
99-
command: ["kubectl"]
100-
args:
101-
- delete
102-
- validatingwebhookconfigurations.admissionregistration.k8s.io
103-
- capi-validating-webhook-configuration
104-
- --ignore-not-found=true
105-
securityContext:
106-
seccompProfile:
107-
type: RuntimeDefault
108-
allowPrivilegeEscalation: false
109-
capabilities:
110-
drop:
111-
- ALL
112-
runAsNonRoot: true
113-
runAsUser: 1000
97+
- name: cluster-api-operator-validatingwebhook-cleanup
98+
image: {{ .Values.shellImage }}
99+
command: ["kubectl"]
100+
args:
101+
- delete
102+
- validatingwebhookconfigurations.admissionregistration.k8s.io
103+
- capi-validating-webhook-configuration
104+
- --ignore-not-found=true
105+
securityContext:
106+
seccompProfile:
107+
type: RuntimeDefault
108+
allowPrivilegeEscalation: false
109+
capabilities:
110+
drop:
111+
- ALL
112+
runAsNonRoot: true
113+
runAsUser: 1000
114114
restartPolicy: Never
115115
---
116116
apiVersion: batch/v1
@@ -129,7 +129,7 @@ spec:
129129
restartPolicy: Never
130130
containers:
131131
- name: delete-capi-controller-manager
132-
image: {{ .Values.kubectlImage }}
132+
image: {{ .Values.shellImage }}
133133
command: ["kubectl"]
134134
args:
135135
- delete

charts/rancher-turtles/templates/pre-delete-job.yaml

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -55,24 +55,25 @@ spec:
5555
spec:
5656
serviceAccountName: pre-delete-job
5757
containers:
58-
- name: rancher-capiprovider-cleanup
59-
image: {{ .Values.kubectlImage }}
60-
args:
61-
- delete
62-
- capiprovider
63-
- cluster-api
64-
- -n
65-
- {{ index .Values "cluster-api-operator" "cluster-api" "core" "namespace" }}
66-
- --ignore-not-found=true
67-
- --cascade=foreground
68-
securityContext:
69-
seccompProfile:
70-
type: RuntimeDefault
71-
allowPrivilegeEscalation: false
72-
capabilities:
73-
drop:
74-
- ALL
75-
runAsNonRoot: true
76-
runAsUser: 1000
58+
- name: rancher-capiprovider-cleanup
59+
image: {{ .Values.shellImage }}
60+
command: ["kubectl"]
61+
args:
62+
- delete
63+
- capiprovider
64+
- cluster-api
65+
- -n
66+
- {{ index .Values "cluster-api-operator" "cluster-api" "core" "namespace" }}
67+
- --ignore-not-found=true
68+
- --cascade=foreground
69+
securityContext:
70+
seccompProfile:
71+
type: RuntimeDefault
72+
allowPrivilegeEscalation: false
73+
capabilities:
74+
drop:
75+
- ALL
76+
runAsNonRoot: true
77+
runAsUser: 1000
7778
restartPolicy: Never
7879
{{- end }}

charts/rancher-turtles/values.schema.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@
4242
"rancherInstalled": {
4343
"type": "boolean"
4444
},
45-
"kubectlImage": {
46-
"type": "string"
47-
},
4845
"shellImage": {
4946
"type": "string"
5047
},

charts/rancher-turtles/values.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ managerArguments: []
2727
imagePullSecrets: []
2828
# rancherInstalled: True if Rancher already installed is in the cluster, this is the preferred installation way.
2929
rancherInstalled: true
30-
# kubectlImage: Image for kubectl tasks.
31-
kubectlImage: registry.k8s.io/kubernetes/kubectl:v1.34.1
3230
# shellImage: Image for shell tasks.
3331
shellImage: rancher/kuberlr-kubectl:v5.0.0
3432
# features: Optional and experimental features.

0 commit comments

Comments
 (0)