diff --git a/examples/chart/teleport-cluster/templates/auth/predeploy_job.yaml b/examples/chart/teleport-cluster/templates/auth/predeploy_job.yaml index 0b2357249b009..a03225d240cbb 100644 --- a/examples/chart/teleport-cluster/templates/auth/predeploy_job.yaml +++ b/examples/chart/teleport-cluster/templates/auth/predeploy_job.yaml @@ -19,6 +19,10 @@ spec: {{- end }} {{- if $auth.tolerations }} tolerations: {{- toYaml $auth.tolerations | nindent 6 }} +{{- end }} +{{- if $auth.imagePullSecrets }} + imagePullSecrets: + {{- toYaml $auth.imagePullSecrets | nindent 6 }} {{- end }} restartPolicy: Never containers: diff --git a/examples/chart/teleport-cluster/templates/proxy/predeploy_job.yaml b/examples/chart/teleport-cluster/templates/proxy/predeploy_job.yaml index 2efc7eaab84b9..084adfb9ba9c3 100644 --- a/examples/chart/teleport-cluster/templates/proxy/predeploy_job.yaml +++ b/examples/chart/teleport-cluster/templates/proxy/predeploy_job.yaml @@ -19,6 +19,10 @@ spec: {{- end }} {{- if $proxy.tolerations }} tolerations: {{- toYaml $proxy.tolerations | nindent 6 }} +{{- end }} +{{- if $proxy.imagePullSecrets }} + imagePullSecrets: + {{- toYaml $proxy.imagePullSecrets | nindent 6 }} {{- end }} restartPolicy: Never containers: diff --git a/examples/chart/teleport-cluster/tests/__snapshot__/predeploy_test.yaml.snap b/examples/chart/teleport-cluster/tests/__snapshot__/predeploy_test.yaml.snap new file mode 100644 index 0000000000000..288859daaa081 --- /dev/null +++ b/examples/chart/teleport-cluster/tests/__snapshot__/predeploy_test.yaml.snap @@ -0,0 +1,6 @@ +should set imagePullSecrets on auth predeploy job when set in values: + 1: | + - name: myRegistryKeySecretName +should set imagePullSecrets on proxy predeploy job when set in values: + 1: | + - name: myRegistryKeySecretName diff --git a/examples/chart/teleport-cluster/tests/predeploy_test.yaml b/examples/chart/teleport-cluster/tests/predeploy_test.yaml index f1e74926195f9..fb32cfac79460 100644 --- a/examples/chart/teleport-cluster/tests/predeploy_test.yaml +++ b/examples/chart/teleport-cluster/tests/predeploy_test.yaml @@ -87,3 +87,25 @@ tests: - equal: path: spec.template.spec.containers[0].resources.requests.memory value: 2Gi + + - it: should set imagePullSecrets on proxy predeploy job when set in values + template: proxy/predeploy_job.yaml + values: + - ../.lint/imagepullsecrets.yaml + asserts: + - equal: + path: spec.template.spec.imagePullSecrets[0].name + value: myRegistryKeySecretName + - matchSnapshot: + path: spec.template.spec.imagePullSecrets + + - it: should set imagePullSecrets on auth predeploy job when set in values + template: auth/predeploy_job.yaml + values: + - ../.lint/imagepullsecrets.yaml + asserts: + - equal: + path: spec.template.spec.imagePullSecrets[0].name + value: myRegistryKeySecretName + - matchSnapshot: + path: spec.template.spec.imagePullSecrets