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 }} {{- range .Values.containers }}
- name: {{ .name }} - name: {{ .name }}
image: "{{ .image.repository }}:{{ .image.tag }}" image: "{{ .image.repository }}:{{ .image.tag }}"
imagePullPolicy: {{ .image.pullPolicy }} imagePullPolicy: {{ .image.pullPolicy | default "IfNotPresent" }}
ports: ports:
- name: {{ .ports.name }} - name: {{ .ports.name }}
containerPort: {{ .ports.containerPort }} containerPort: {{ .ports.containerPort }}

View File

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