Skip to content

Commit

Permalink
chore(base-cluster): streamline imagePullPolicy (#757)
Browse files Browse the repository at this point in the history
  • Loading branch information
cwrau authored Feb 16, 2024
1 parent 4c469f9 commit 61f1c7f
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ spec:
containers:
- name: remove-backup-storage-locations
image: {{ include "common.images.image" (dict "imageRoot" .Values.global.kubectl.image "global" .Values.global) }}
{{- if .Values.global.kubectl.image.digest }}
imagePullPolicy: IfNotPresent
{{- else }}
imagePullPolicy: Always
{{- end }}
imagePullPolicy: {{ empty .Values.global.kubectl.image.digest | ternary "Always" "IfNotPresent" }}
securityContext:
readOnlyRootFilesystem: true
privileged: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ spec:
containers:
- name: generate-ssh-key
image: {{ template "base-cluster.flux.image" .context }}
{{- if .context.Values.global.flux.image.digest }}
imagePullPolicy: IfNotPresent
{{- else }}
imagePullPolicy: Always
{{- end }}
imagePullPolicy: {{ empty .context.Values.global.flux.image.digest | ternary "Always" "IfNotPresent" }}
securityContext:
readOnlyRootFilesystem: true
privileged: false
Expand All @@ -52,11 +48,7 @@ spec:
initContainers:
- name: generate-gpg-key
image: {{ template "base-cluster.gpg.image" .context }}
{{- if .context.Values.global.gpg.image.digest }}
imagePullPolicy: IfNotPresent
{{- else }}
imagePullPolicy: Always
{{- end }}
imagePullPolicy: {{ empty .context.Values.global.gpg.image.digest | ternary "Always" "IfNotPresent" }}
env:
- name: IDENTITY
value: {{ .identity }}
Expand Down Expand Up @@ -94,11 +86,7 @@ spec:
containers:
- name: create-k8s-secret
image: {{ include "base-cluster.kubectl.image" .context }}
{{- if .context.Values.global.kubectl.image.digest }}
imagePullPolicy: IfNotPresent
{{- else }}
imagePullPolicy: Always
{{- end }}
imagePullPolicy: {{ empty .context.Values.global.kubectl.image.digest | ternary "Always" "IfNotPresent" }}
securityContext:
readOnlyRootFilesystem: true
privileged: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ spec:
containers:
- name: fail
image: {{ template "base-cluster.kubectl.image" . }}
{{- if .Values.global.kubectl.image.digest }}
imagePullPolicy: IfNotPresent
{{- else }}
imagePullPolicy: Always
{{- end }}
imagePullPolicy: {{ empty .Values.global.kubectl.image.digest | ternary "Always" "IfNotPresent" }}
securityContext:
readOnlyRootFilesystem: true
privileged: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ spec:
containers:
- name: watchdog
image: {{ template "base-cluster.curl.image" . }}
{{- if .Values.global.kubectl.image.digest }}
imagePullPolicy: IfNotPresent
{{- else }}
imagePullPolicy: Always
{{- end }}
imagePullPolicy: {{ empty .Values.global.kubectl.image.digest | ternary "Always" "IfNotPresent" }}
securityContext:
allowPrivilegeEscalation: false
capabilities:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ spec:
containers:
- name: register
image: {{ include "base-cluster.curl.image" . }}
{{- if .Values.global.kubectl.image.digest }}
imagePullPolicy: IfNotPresent
{{- else }}
imagePullPolicy: Always
{{- end }}
imagePullPolicy: {{ empty .Values.global.kubectl.image.digest | ternary "Always" "IfNotPresent" }}
securityContext:
allowPrivilegeEscalation: false
capabilities:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ spec:
containers:
- name: unregister
image: {{ include "base-cluster.curl.image" . }}
{{- if .Values.global.kubectl.image.digest }}
imagePullPolicy: IfNotPresent
{{- else }}
imagePullPolicy: Always
{{- end }}
imagePullPolicy: {{ empty .Values.global.kubectl.image.digest | ternary "Always" "IfNotPresent" }}
securityContext:
allowPrivilegeEscalation: false
capabilities:
Expand Down

0 comments on commit 61f1c7f

Please sign in to comment.