Skip to content

Commit

Permalink
feat(chart): new value image.tagSuffix for container flavor selection
Browse files Browse the repository at this point in the history
  • Loading branch information
npdgm committed Sep 19, 2022
1 parent 271c765 commit c6d59c9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions deploy/charts/x509-certificate-exporter/README.md
Expand Up @@ -311,6 +311,7 @@ in the container namespace.
| image.registry | string | `"docker.io"` | x509-certificate-exporter image registry |
| image.repository | string | `"enix/x509-certificate-exporter"` | x509-certificate-exporter image repository |
| image.tag | string | `nil` | x509-certificate-exporter image tag (defaults to Chart appVersion) |
| image.tagSuffix | string | `nil` | Suffix added to image tags for container flavor selection (could be `-busybox`, `-alpine`, or `-scratch`) |
| image.pullPolicy | string | `"IfNotPresent"` | x509-certificate-exporter image pull policy |
| psp.create | bool | `false` | Should Pod Security Policy resources be created |
| rbac.create | bool | `true` | Should RBAC resources be created |
Expand Down
Expand Up @@ -60,7 +60,7 @@ Return the proper x509-certificate-exporter image name
{{- define "x509-certificate-exporter.image" -}}
{{- $registryName := .Values.image.registry -}}
{{- $repositoryName := .Values.image.repository -}}
{{- $tag := default .Chart.AppVersion .Values.image.tag | toString -}}
{{- $tag := printf "%s%s" ( default .Chart.AppVersion .Values.image.tag | toString ) ( .Values.image.tagSuffix | toString ) -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
Expand Down
2 changes: 2 additions & 0 deletions deploy/charts/x509-certificate-exporter/values.yaml
Expand Up @@ -30,6 +30,8 @@ image:
repository: enix/x509-certificate-exporter
# -- x509-certificate-exporter image tag (defaults to Chart appVersion)
tag:
# -- Suffix added to image tags for container flavor selection (could be `-busybox`, `-alpine`, or `-scratch`)
tagSuffix:
# -- x509-certificate-exporter image pull policy
pullPolicy: IfNotPresent

Expand Down

0 comments on commit c6d59c9

Please sign in to comment.