Ensure all containers have imagePullPolicy
This PS adds the imagePullPolicy to all containers and provides a test to ensure it is always there. Implements: blueprint image-pull-policy Change-Id: I9a94e3a1ab909dcea0960b490aa57a5432780961
This commit is contained in:
parent
e8b988469e
commit
d350e0a156
@ -84,6 +84,7 @@ spec:
|
||||
{{- if $localVals.haproxy }}
|
||||
- name: haproxy
|
||||
image: {{ include "haproxy_image_full" . | quote }}
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
@ -127,6 +128,7 @@ spec:
|
||||
{{- end }}
|
||||
- name: main
|
||||
image: "{{ .imageFull }}"
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
{{- if $localVals.haproxy }}
|
||||
lifecycle:
|
||||
preStop:
|
||||
|
@ -1,4 +1,5 @@
|
||||
{{- define "common_create_db_job" }}
|
||||
{{- $imagePullPolicy := include "kolla_val_get_str" (dict "key" "image_pull_policy" "searchPath" .searchPath "Values" .Values ) }}
|
||||
{{- $containerConfigDirectory := include "kolla_val_get_str" (dict "key" "container_config_directory" "searchPath" .searchPath "Values" .Values ) }}
|
||||
{{- $selectorKey := include "kolla_val_get_str" (dict "key" "selector_key" "searchPath" .searchPath "Values" .Values ) }}
|
||||
{{- $selectorValue := include "kolla_val_get_str" (dict "key" "selector_value" "searchPath" .searchPath "Values" .Values ) }}
|
||||
@ -22,6 +23,7 @@ spec:
|
||||
restartPolicy: OnFailure
|
||||
containers:
|
||||
- image: {{ include "kolla_toolbox_image_full" . | quote }}
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: "creating-{{ .serviceName }}-database"
|
||||
command: ["sh", "-c"]
|
||||
args:
|
||||
@ -44,6 +46,7 @@ spec:
|
||||
name: database-password
|
||||
key: password
|
||||
- image: {{ include "kolla_toolbox_image_full" . | quote }}
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: "creating-{{ .serviceName }}-user-and-permissions"
|
||||
command: ["sh", "-c"]
|
||||
args:
|
||||
|
@ -1,4 +1,5 @@
|
||||
{{- define "common_create_keystone_endpoint" }}
|
||||
{{- $imagePullPolicy := include "kolla_val_get_str" (dict "key" "image_pull_policy" "searchPath" .searchPath "Values" .Values ) }}
|
||||
{{- $region := include "kolla_val_get_str" (dict "key" "region" "searchPath" .searchPath "Values" .Values ) }}
|
||||
{{- $selectorKey := include "kolla_val_get_str" (dict "key" "selector_key" "searchPath" .searchPath "Values" .Values ) }}
|
||||
{{- $selectorValue := include "kolla_val_get_str" (dict "key" "selector_value" "searchPath" .searchPath "Values" .Values ) }}
|
||||
@ -29,6 +30,7 @@ spec:
|
||||
{{ $selectorKey }}: {{ $selectorValue | quote }}
|
||||
containers:
|
||||
- image: {{ include "kolla_toolbox_image_full" . | quote }}
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: main
|
||||
command: ["sh", "-xec"]
|
||||
args:
|
||||
|
@ -1,4 +1,5 @@
|
||||
{{- define "common_create_keystone_service" }}
|
||||
{{- $imagePullPolicy := include "kolla_val_get_str" (dict "key" "image_pull_policy" "searchPath" .searchPath "Values" .Values ) }}
|
||||
{{- $region := include "kolla_val_get_str" (dict "key" "region" "searchPath" .searchPath "Values" .Values ) }}
|
||||
{{- $selectorKey := include "kolla_val_get_str" (dict "key" "selector_key" "searchPath" .searchPath "Values" .Values ) }}
|
||||
{{- $selectorValue := include "kolla_val_get_str" (dict "key" "selector_value" "searchPath" .searchPath "Values" .Values ) }}
|
||||
@ -29,6 +30,7 @@ spec:
|
||||
{{ $selectorKey }}: {{ $selectorValue | quote }}
|
||||
containers:
|
||||
- image: {{ include "kolla_toolbox_image_full" . | quote }}
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: main
|
||||
command: ["sh", "-xec"]
|
||||
args:
|
||||
|
@ -1,4 +1,5 @@
|
||||
{{- define "common_create_keystone_user" }}
|
||||
{{- $imagePullPolicy := include "kolla_val_get_str" (dict "key" "image_pull_policy" "searchPath" .searchPath "Values" .Values ) }}
|
||||
{{- $region := include "kolla_val_get_str" (dict "key" "region" "searchPath" .searchPath "Values" .Values ) }}
|
||||
{{- $selectorKey := include "kolla_val_get_str" (dict "key" "selector_key" "searchPath" .searchPath "Values" .Values ) }}
|
||||
{{- $selectorValue := include "kolla_val_get_str" (dict "key" "selector_value" "searchPath" .searchPath "Values" .Values ) }}
|
||||
@ -28,6 +29,7 @@ spec:
|
||||
{{ $selectorKey }}: {{ $selectorValue | quote }}
|
||||
containers:
|
||||
- image: {{ include "kolla_toolbox_image_full" . | quote }}
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: main
|
||||
command: ["sh", "-xec"]
|
||||
args:
|
||||
|
@ -1,4 +1,5 @@
|
||||
{{- define "common_delete_db_job" }}
|
||||
{{- $imagePullPolicy := include "kolla_val_get_str" (dict "key" "image_pull_policy" "searchPath" .searchPath "Values" .Values ) }}
|
||||
{{- $containerConfigDirectory := include "kolla_val_get_str" (dict "key" "container_config_directory" "searchPath" .searchPath "Values" .Values ) }}
|
||||
{{- $selectorKey := include "kolla_val_get_str" (dict "key" "selector_key" "searchPath" .searchPath "Values" .Values ) }}
|
||||
{{- $selectorValue := include "kolla_val_get_str" (dict "key" "selector_value" "searchPath" .searchPath "Values" .Values ) }}
|
||||
@ -22,6 +23,7 @@ spec:
|
||||
restartPolicy: OnFailure
|
||||
containers:
|
||||
- image: {{ include "kolla_toolbox_image_full" . | quote }}
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: "deleting-{{ .serviceName }}-database"
|
||||
command: ["sh", "-c"]
|
||||
args:
|
||||
@ -45,6 +47,7 @@ spec:
|
||||
name: database-password
|
||||
key: password
|
||||
- image: {{ include "kolla_toolbox_image_full" . | quote }}
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: "deleting-{{ .serviceName }}-user"
|
||||
command: ["sh", "-c"]
|
||||
args:
|
||||
|
@ -1,4 +1,5 @@
|
||||
{{- define "common_delete_keystone_service" }}
|
||||
{{- $imagePullPolicy := include "kolla_val_get_str" (dict "key" "image_pull_policy" "searchPath" .searchPath "Values" .Values ) }}
|
||||
{{- $region := include "kolla_val_get_str" (dict "key" "region" "searchPath" .searchPath "Values" .Values ) }}
|
||||
{{- $selectorKey := include "kolla_val_get_str" (dict "key" "selector_key" "searchPath" .searchPath "Values" .Values ) }}
|
||||
{{- $selectorValue := include "kolla_val_get_str" (dict "key" "selector_value" "searchPath" .searchPath "Values" .Values ) }}
|
||||
@ -29,6 +30,7 @@ spec:
|
||||
{{ $selectorKey }}: {{ $selectorValue | quote }}
|
||||
containers:
|
||||
- image: {{ include "kolla_toolbox_image_full" . | quote }}
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: main
|
||||
command: ["sh", "-xec"]
|
||||
args:
|
||||
|
@ -1,4 +1,5 @@
|
||||
{{- define "common_delete_keystone_user" }}
|
||||
{{- $imagePullPolicy := include "kolla_val_get_str" (dict "key" "image_pull_policy" "searchPath" .searchPath "Values" .Values ) }}
|
||||
{{- $region := include "kolla_val_get_str" (dict "key" "region" "searchPath" .searchPath "Values" .Values ) }}
|
||||
{{- $selectorKey := include "kolla_val_get_str" (dict "key" "selector_key" "searchPath" .searchPath "Values" .Values ) }}
|
||||
{{- $selectorValue := include "kolla_val_get_str" (dict "key" "selector_value" "searchPath" .searchPath "Values" .Values ) }}
|
||||
@ -28,6 +29,7 @@ spec:
|
||||
{{ $selectorKey }}: {{ $selectorValue | quote }}
|
||||
containers:
|
||||
- image: {{ include "kolla_toolbox_image_full" . | quote }}
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: main
|
||||
command: ["sh", "-xec"]
|
||||
args:
|
||||
|
@ -25,9 +25,11 @@
|
||||
{{- $_ := set $c1 "retKey" "kube_logger" }}
|
||||
{{- $_ := include "kolla_val_get_raw" $c1 }}
|
||||
{{- $containerConfigDirectory := include "kolla_val_get_str" (dict "key" "container_config_directory" "searchPath" .searchPath "Values" .Values ) }}
|
||||
{{- $imagePullPolicy := include "kolla_val_get_str" (dict "key" "image_pull_policy" "searchPath" .searchPath "Values" .Values ) }}
|
||||
{{- if $localVals.kube_logger }}
|
||||
- name: logging
|
||||
image: {{ include "fluentd_image_full" . | quote }}
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
volumeMounts:
|
||||
- mountPath: {{ $containerConfigDirectory }}
|
||||
name: logging-config
|
||||
|
@ -1,4 +1,5 @@
|
||||
{{- define "common_manage_db_job" }}
|
||||
{{- $imagePullPolicy := include "kolla_val_get_str" (dict "key" "image_pull_policy" "searchPath" .searchPath "Values" .Values ) }}
|
||||
{{- $containerConfigDirectory := include "kolla_val_get_str" (dict "key" "container_config_directory" "searchPath" .searchPath "Values" .Values ) }}
|
||||
{{- $selectorKey := include "kolla_val_get_str" (dict "key" "selector_key" "searchPath" .searchPath "Values" .Values ) }}
|
||||
{{- $selectorValue := include "kolla_val_get_str" (dict "key" "selector_value" "searchPath" .searchPath "Values" .Values ) }}
|
||||
@ -17,6 +18,7 @@ spec:
|
||||
restartPolicy: OnFailure
|
||||
containers:
|
||||
- image: {{ .imageFull | quote }}
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: "main"
|
||||
volumeMounts:
|
||||
{{ include "common_volume_mounts" . | indent 12 }}
|
||||
|
@ -43,6 +43,7 @@ spec:
|
||||
containers:
|
||||
- name: main
|
||||
image: "{{ .imageFull }}"
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
volumeMounts:
|
||||
{{- include "common_volume_mounts" . | indent 12 }}
|
||||
- mountPath: {{ $containerConfigDirectory }}
|
||||
|
@ -5,6 +5,7 @@
|
||||
{{- $_ := set $c "imageName" "image_full" }}
|
||||
{{- $_ := set $c "tagName" "image_tag" }}
|
||||
{{- $imageFull := include "kolla_build_image_full" $c }}
|
||||
{{- $imagePullPolicy := include "kolla_val_get_str" (dict "key" "image_pull_policy" "searchPath" $searchPath "Values" .Values ) }}
|
||||
{{- $selectorKey := include "kolla_val_get_str" (dict "key" "selector_key" "searchPath" $searchPath "Values" .Values ) }}
|
||||
{{- $selectorValue := include "kolla_val_get_str" (dict "key" "selector_value" "searchPath" $searchPath "Values" .Values ) }}
|
||||
{{- $netHostTrue := true }}
|
||||
@ -22,6 +23,7 @@ spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- image: "{{ $imageFull }}"
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: main
|
||||
command:
|
||||
- /bin/bash
|
||||
|
@ -5,6 +5,7 @@
|
||||
{{- $_ := set $c "imageName" "image_full" }}
|
||||
{{- $_ := set $c "tagName" "image_tag" }}
|
||||
{{- $imageFull := include "kolla_build_image_full" $c }}
|
||||
{{- $imagePullPolicy := include "kolla_val_get_str" (dict "key" "image_pull_policy" "searchPath" $searchPath "Values" .Values ) }}
|
||||
{{- $selectorKey := include "kolla_val_get_str" (dict "key" "selector_key" "searchPath" $searchPath "Values" .Values ) }}
|
||||
{{- $selectorValue := include "kolla_val_get_str" (dict "key" "selector_value" "searchPath" $searchPath "Values" .Values ) }}
|
||||
{{- $netHostTrue := true }}
|
||||
@ -30,6 +31,7 @@ spec:
|
||||
{{ $selectorKey }}: {{ $selectorValue | quote }}
|
||||
containers:
|
||||
- image: "{{ $imageFull }}"
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: main
|
||||
securityContext:
|
||||
privileged: true
|
||||
|
@ -72,6 +72,7 @@ spec:
|
||||
containers:
|
||||
- name: main
|
||||
image: "{{ $imageFull }}"
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
volumeMounts:
|
||||
{{- include "common_volume_mounts" $env | indent 12 }}
|
||||
- mountPath: /var/lib/kolla-kubernetes/event
|
||||
|
@ -88,6 +88,7 @@ spec:
|
||||
{{ $selectorKey }}: {{ $selectorValue | quote }}
|
||||
containers:
|
||||
- image: "{{ $imageFull }}"
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: main
|
||||
env:
|
||||
{{- include "common_env_vars" $env | indent 12 }}
|
||||
|
@ -94,6 +94,7 @@ spec:
|
||||
{{ $selectorKey }}: {{ $selectorValue | quote }}
|
||||
containers:
|
||||
- image: "{{ $imageFull }}"
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: main
|
||||
securityContext:
|
||||
privileged: true
|
||||
|
@ -115,6 +115,7 @@ spec:
|
||||
{{- if $localVals.haproxy }}
|
||||
- name: haproxy
|
||||
image: {{ include "haproxy_image_full" . | quote }}
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
@ -153,6 +154,7 @@ spec:
|
||||
{{- end }}
|
||||
- name: main
|
||||
image: "{{ $imageFull }}"
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
{{- if $localVals.haproxy }}
|
||||
lifecycle:
|
||||
preStop:
|
||||
|
@ -33,6 +33,7 @@ spec:
|
||||
{{ $selectorKey }}: {{ $selectorValue | quote }}
|
||||
containers:
|
||||
- image: {{ $imageFull | quote }}
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: main
|
||||
env:
|
||||
{{- include "common_bootstrap_env_vars" $env | indent 12 }}
|
||||
|
@ -1,5 +1,4 @@
|
||||
{{- $searchPath := ":global.kolla.helm-repo.deployment:global.kolla.helm-repo.all:global.kolla.all" }}
|
||||
{{- $imagePullPolicy := include "kolla_val_get_str" (dict "key" "image_pull_policy" "searchPath" $searchPath "Values" .Values ) }}
|
||||
{{- $selectorKey := include "kolla_val_get_str" (dict "key" "selector_key" "searchPath" $searchPath "Values" .Values ) }}
|
||||
{{- $selectorValue := include "kolla_val_get_str" (dict "key" "selector_value" "searchPath" $searchPath "Values" .Values ) }}
|
||||
{{- $replicas := include "kolla_val_get_str" (dict "key" "replicas" "searchPath" $searchPath "Values" .Values ) }}
|
||||
@ -100,6 +99,7 @@ spec:
|
||||
containers:
|
||||
- name: main
|
||||
image: "{{ $imageFull }}"
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
volumeMounts:
|
||||
{{- include "common_volume_mounts" $env | indent 12 }}
|
||||
{{- if $persistent }}
|
||||
|
@ -37,6 +37,7 @@ spec:
|
||||
containers:
|
||||
- name: main
|
||||
image: "{{ $imageFull }}"
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
volumeMounts:
|
||||
{{- include "common_volume_mounts" $env | indent 10 }}
|
||||
- mountPath: {{ $containerConfigDirectory }}
|
||||
|
@ -56,6 +56,7 @@ spec:
|
||||
{{ $selectorKey }}: {{ $selectorValue | quote }}
|
||||
containers:
|
||||
- image: "{{ $imageFull }}"
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: main
|
||||
securityContext:
|
||||
privileged: true
|
||||
|
@ -16,6 +16,7 @@
|
||||
{{- $_ := set $c "imageName" "image_full" }}
|
||||
{{- $_ := set $c "tagName" "image_tag" }}
|
||||
{{- $imageFull := include "kolla_build_image_full" $c }}
|
||||
{{- $imagePullPolicy := include "kolla_val_get_str" (dict "key" "image_pull_policy" "searchPath" $searchPath "Values" .Values ) }}
|
||||
{{- $resourceName := "keystone" }}
|
||||
{{- $netHostTrue := false }}
|
||||
{{- $podTypeBootstrap := true }}
|
||||
@ -41,6 +42,7 @@ spec:
|
||||
restartPolicy: OnFailure
|
||||
containers:
|
||||
- image: "{{ $imageFull }}"
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: main
|
||||
command: ["sh", "-c", "mkdir -p /var/log/kolla/keystone; sudo -E kolla_set_configs;
|
||||
kolla_keystone_bootstrap admin
|
||||
|
@ -7,6 +7,7 @@
|
||||
{{- $_ := set $c "imageName" "image_full" }}
|
||||
{{- $_ := set $c "tagName" "image_tag" }}
|
||||
{{- $imageFull := include "kolla_build_image_full" $c }}
|
||||
{{- $imagePullPolicy := include "kolla_val_get_str" (dict "key" "image_pull_policy" "searchPath" $searchPath "Values" .Values ) }}
|
||||
{{- $containerConfigDirectory := include "kolla_val_get_str" (dict "key" "container_config_directory" "searchPath" $searchPath "Values" .Values ) }}
|
||||
{{- $selectorKey := include "kolla_val_get_str" (dict "key" "selector_key" "searchPath" $searchPath "Values" .Values ) }}
|
||||
{{- $selectorValue := include "kolla_val_get_str" (dict "key" "selector_value" "searchPath" $searchPath "Values" .Values ) }}
|
||||
@ -22,6 +23,7 @@ spec:
|
||||
{{ $selectorKey }}: {{ $selectorValue | quote }}
|
||||
containers:
|
||||
- image: "{{ $imageFull }}"
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: main
|
||||
volumeMounts:
|
||||
{{- include "common_volume_mounts" $env | indent 12 }}
|
||||
|
@ -7,6 +7,7 @@
|
||||
{{- $_ := set $c "imageName" "image_full" }}
|
||||
{{- $_ := set $c "tagName" "image_tag" }}
|
||||
{{- $imageFull := include "kolla_build_image_full" $c }}
|
||||
{{- $imagePullPolicy := include "kolla_val_get_str" (dict "key" "image_pull_policy" "searchPath" $searchPath "Values" .Values ) }}
|
||||
{{- $containerConfigDirectory := include "kolla_val_get_str" (dict "key" "container_config_directory" "searchPath" $searchPath "Values" .Values ) }}
|
||||
{{- $selectorKey := include "kolla_val_get_str" (dict "key" "selector_key" "searchPath" $searchPath "Values" .Values ) }}
|
||||
{{- $selectorValue := include "kolla_val_get_str" (dict "key" "selector_value" "searchPath" $searchPath "Values" .Values ) }}
|
||||
@ -33,6 +34,7 @@ spec:
|
||||
{{ $selectorKey }}: {{ $selectorValue | quote }}
|
||||
containers:
|
||||
- image: "{{ $imageFull }}"
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: main
|
||||
lifecycle:
|
||||
preStop:
|
||||
|
@ -19,6 +19,7 @@
|
||||
{{- $selectorValue := include "kolla_val_get_str" (dict "key" "selector_value" "searchPath" $searchPath "Values" .Values ) }}
|
||||
{{- $port := include "kolla_val_get_str" (dict "key" "port" "searchPath" $searchPath "Values" .Values ) }}
|
||||
{{- $containerConfigDirectory := include "kolla_val_get_str" (dict "key" "container_config_directory" "searchPath" $searchPath "Values" .Values ) }}
|
||||
{{- $imagePullPolicy := include "kolla_val_get_str" (dict "key" "image_pull_policy" "searchPath" $searchPath "Values" .Values ) }}
|
||||
{{- if $localVals.enabled }}
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
@ -39,6 +40,7 @@ spec:
|
||||
{{ $selectorKey }}: {{ $selectorValue | quote }}
|
||||
containers:
|
||||
- image: "{{ $memcachedImageFull }}"
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: main
|
||||
volumeMounts:
|
||||
{{- include "common_volume_mounts" $env | indent 12 }}
|
||||
|
@ -109,6 +109,7 @@ spec:
|
||||
{{ $selectorKey }}: {{ $selectorValue | quote }}
|
||||
containers:
|
||||
- image: {{ $imageFull | quote }}
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: main
|
||||
securityContext:
|
||||
privileged: true
|
||||
|
@ -118,6 +118,7 @@ spec:
|
||||
{{ $selectorKey }}: {{ $selectorValue | quote }}
|
||||
containers:
|
||||
- image: "{{ $imageFull }}"
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: main
|
||||
securityContext:
|
||||
privileged: true
|
||||
|
@ -133,6 +133,7 @@ spec:
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: main
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
image: "{{ $imageFull }}"
|
||||
securityContext:
|
||||
privileged: true
|
||||
|
@ -97,6 +97,7 @@ spec:
|
||||
containers:
|
||||
- name: main
|
||||
image: "{{ $imageFull }}"
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
|
@ -59,6 +59,7 @@ spec:
|
||||
{{ $selectorKey }}: {{ $selectorValue | quote }}
|
||||
containers:
|
||||
- image: "{{ $imageFull }}"
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: main
|
||||
securityContext:
|
||||
privileged: true
|
||||
|
@ -99,6 +99,7 @@ spec:
|
||||
{{ $selectorKey }}: {{ $selectorValue | quote }}
|
||||
containers:
|
||||
- image: "{{ $imageFull }}"
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: main
|
||||
securityContext:
|
||||
privileged: true
|
||||
|
@ -27,6 +27,7 @@ spec:
|
||||
{{ $selectorKey }}: {{ $selectorValue | quote }}
|
||||
containers:
|
||||
- image: "{{ $imageFull }}"
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: main
|
||||
volumeMounts:
|
||||
{{- include "common_volume_mounts" $env | indent 12 }}
|
||||
|
@ -55,6 +55,7 @@ spec:
|
||||
{{ $selectorKey }}: {{ $selectorValue | quote }}
|
||||
containers:
|
||||
- image: "{{ $imageFull }}"
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: main
|
||||
volumeMounts:
|
||||
{{- include "common_volume_mounts" $env | indent 12 }}
|
||||
|
@ -62,6 +62,7 @@ spec:
|
||||
{{ $selectorKey }}: {{ $selectorValue | quote }}
|
||||
containers:
|
||||
- image: "{{ $imageFull }}"
|
||||
imagePullPolicy: {{ $imagePullPolicy | quote }}
|
||||
name: main
|
||||
securityContext:
|
||||
privileged: true
|
||||
|
@ -24,6 +24,11 @@ def _isdir(path, entry):
|
||||
|
||||
class TestK8sTemplatesTest(base.BaseTestCase):
|
||||
|
||||
def _validate_image_pull_policy(self, package, pod):
|
||||
for container in pod['spec']['containers']:
|
||||
if 'imagePullPolicy' not in container:
|
||||
raise Exception("imagePullPolicy not in %s" % package)
|
||||
|
||||
def test_validate_templates(self):
|
||||
srcdir = os.environ['HELMDIR']
|
||||
helmbin = os.environ['HELMBIN']
|
||||
@ -59,3 +64,10 @@ class TestK8sTemplatesTest(base.BaseTestCase):
|
||||
if e.args[0] not in m:
|
||||
raise
|
||||
json.loads(js)
|
||||
pod = None
|
||||
try:
|
||||
pod = y['spec']['template']
|
||||
except Exception:
|
||||
pass
|
||||
if pod:
|
||||
self._validate_image_pull_policy(package, pod)
|
||||
|
4
releasenotes/notes/image-pull-4fc22fd41caf5904.yaml
Normal file
4
releasenotes/notes/image-pull-4fc22fd41caf5904.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Image pull policy can now be set for all containerns.
|
Loading…
Reference in New Issue
Block a user