Skip to content

Commit

Permalink
feat: add imagePullPolicy helper function to common chart (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
prakrit55 authored Jan 17, 2024
1 parent 8d358d6 commit 7b7e293
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ type: library
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.1
version: 0.1.2
11 changes: 11 additions & 0 deletions charts/common/templates/_images.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ Return the proper Image Registry Secret Names evaluating values as templates
{{- end -}}
{{- end -}}

{{/*
Checks for the imagePullPolicy
*/}}
{{- define "common.imagePullPolicy" -}}
{{- if .Values.global.imagePullPolicy -}}
{{- .Values.global.imagePullPolicy -}}
{{- else -}}
{{- default .Values.imagePullPolicy -}}
{{- end -}}
{{- end -}}

{{- if (not (empty $pullSecrets)) }}
imagePullSecrets:
{{- range $pullSecrets | uniq }}
Expand Down

0 comments on commit 7b7e293

Please sign in to comment.