Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add imagePullPolicy helper function to common chart #125

Merged
merged 2 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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