Default image pull policy (#2)

* Added code for Makefile manifests

* Done changes for default value
This commit is contained in:
Sandeep Rawat 2020-11-09 11:30:10 +05:30 committed by GitHub
parent 03e9cf1ce8
commit 1816f005bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 3 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
templates2
test.yaml

2
Makefile Normal file
View File

@ -0,0 +1,2 @@
generate-manifests:
helm template . > test.yaml

1
stateless-app/Makefile Normal file
View File

@ -0,0 +1 @@
include ../Makefile

View File

@ -24,7 +24,7 @@ spec:
{{- range .Values.containers }}
- name: {{ .name }}
image: "{{ .image.repository }}:{{ .image.tag }}"
imagePullPolicy: {{ .image.pullPolicy }}
imagePullPolicy: {{ .image.pullPolicy | default "IfNotPresent" }}
ports:
- name: {{ .ports.name }}
containerPort: {{ .ports.containerPort }}

View File

@ -7,11 +7,12 @@ podAnnotations:
app.kubernetes.io/managed-by: Helm
podSecurityContext:
fsGroup: 2000
default:
imagePullPolicy: IfNotPresent
containers:
- name: nginx
image:
repository: nginx
pullPolicy: IfNotPresent
tag: "1.17.9"
ports:
name: http
@ -34,7 +35,7 @@ containers:
- name: nginx2
image:
repository: nginx
pullPolicy: IfNotPresent
pullPolicy: Always
tag: "1.17.9"
ports:
name: http