Skip to content
This repository was archived by the owner on Apr 25, 2023. It is now read-only.

Commit 2d128cf

Browse files
authored
Merge pull request #1424 from ExpediaInc/postinstalljob-imagename
fix(postinstall-job): Allow postinstall job to choose a docker repo/image
2 parents d582297 + d1abc2e commit 2d128cf

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

charts/kubefed/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ chart and their default values.
131131
| controllermanager.certManager.rootCertificate.organizations | Specifies the list of organizations to include in the cert-manager generated root certificate. | [] |
132132
| controllermanager.certManager.rootCertificate.commonName | Specifies the CN value for the cert-manager generated root certificate. | ca.webhook.kubefed |
133133
| controllermanager.certManager.rootCertificate.dnsNames | Specifies the list of subject alternative names for the cert-manager generated root certificate. | ["ca.webhook.kubefed"] |
134+
| controllermanager.postInstallJob.repository | Repo of the kubectl image for the post-install job | bitnami |
135+
| controllermanager.postInstallJob.image | Name of the kubectl image for the post-install job | kubectl |
136+
| controllermanager.postInstallJob.tag | Tag of the kubectl image for the post-install | 1.17.16 |
137+
| controllermanager.postInstallJob.imagePullPolicy | Image pull policy of the kubectl post-install job | IfNotPresent |
134138
| global.scope | Whether the KubeFed namespace will be the only target for the control plane. | Cluster |
135139

136140
Specify each parameter using the `--set key=value[,key=value]` argument to

charts/kubefed/charts/controllermanager/templates/post-install-job.yaml

+10-1
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,21 @@ spec:
4242
app.kubernetes.io/instance: {{ .Release.Name | quote }}
4343
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
4444
spec:
45+
{{- if .Values.imagePullSecrets }}
46+
imagePullSecrets:
47+
{{ toYaml .Values.imagePullSecrets | indent 8 }}
48+
{{- end }}
49+
nodeSelector:
50+
{{- toYaml .Values.commonNodeSelector | nindent 8 }}
51+
tolerations:
52+
{{- toYaml .Values.commonTolerations | nindent 8 }}
4553
restartPolicy: Never
4654
serviceAccountName: kubefed-config-hook
4755
automountServiceAccountToken: true
4856
containers:
4957
- name: post-install-job
50-
image: "bitnami/kubectl:1.17.16"
58+
image: "{{ .Values.postInstallJob.repository }}/{{ .Values.postInstallJob.image }}:{{ .Values.postInstallJob.tag }}"
59+
imagePullPolicy: "{{ .Values.postInstallJob.imagePullPolicy }}"
5160
command: ["/bin/bash"]
5261
args: ["/opt/scripts/setup.sh"]
5362
volumeMounts:

charts/kubefed/values.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ controllermanager:
8686
- ca.webhook.kubefed
8787
commonName: ca.webhook.kubefed
8888

89+
postInstallJob:
90+
repository: bitnami
91+
image: kubectl
92+
tag: 1.17.16
93+
imagePullPolicy: IfNotPresent
94+
8995
service:
9096
labels: {}
9197

0 commit comments

Comments
 (0)