fix(deployment): template initContainers
This commit is contained in:
2 files changed
+23
No files matched your search
@@ -105,6 +105,10 @@ spec:
|
|||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with .Values.deployment.initContainers }}
|
||||||
|
initContainers:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
{{- with .Values.deployment.nodeSelector }}
|
{{- with .Values.deployment.nodeSelector }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
|
|||||||
@@ -129,6 +129,9 @@ tests:
|
|||||||
- notExists:
|
- notExists:
|
||||||
path: spec.template.spec.imagePullSecrets
|
path: spec.template.spec.imagePullSecrets
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
|
- notExists:
|
||||||
|
path: spec.template.spec.initContainers
|
||||||
|
template: templates/deployment.yaml
|
||||||
- notExists:
|
- notExists:
|
||||||
path: spec.template.spec.nodeSelector
|
path: spec.template.spec.nodeSelector
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
@@ -463,6 +466,22 @@ tests:
|
|||||||
- name: my-special-secret
|
- name: my-special-secret
|
||||||
template: templates/deployment.yaml
|
template: templates/deployment.yaml
|
||||||
|
|
||||||
|
- it: Test initContainers
|
||||||
|
set:
|
||||||
|
# Ensure that the secrets and config maps are well configured.
|
||||||
|
|
||||||
|
# Normal test values
|
||||||
|
deployment.initContainers:
|
||||||
|
- name: busybox
|
||||||
|
image: docker.io/library/busybox:latest
|
||||||
|
asserts:
|
||||||
|
- contains:
|
||||||
|
path: spec.template.spec.initContainers
|
||||||
|
content:
|
||||||
|
name: busybox
|
||||||
|
image: docker.io/library/busybox:latest
|
||||||
|
template: templates/deployment.yaml
|
||||||
|
|
||||||
- it: Test nodeSelector
|
- it: Test nodeSelector
|
||||||
set:
|
set:
|
||||||
# Ensure that the secrets and config maps are well configured.
|
# Ensure that the secrets and config maps are well configured.
|
||||||
|
|||||||
Reference in new issue
Block a user