diff --git a/Chart.yaml b/Chart.yaml index e827df8..4cec851 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -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 diff --git a/templates/_images.tpl b/templates/_images.tpl index f545726..f16c6e4 100644 --- a/templates/_images.tpl +++ b/templates/_images.tpl @@ -1,7 +1,7 @@ {{/* Return the proper image name. If image tag and digest are not defined, termination fallbacks to chart appVersion. -{{ include "comet-common.images.image" ( dict "imageRoot" .Values.path.to.the.image "global" .Values.global "chart" .Chart ) }} + {{ include "comet-common.images.image" ( dict "imageRoot" .Values.path.to.the.image "global" .Values.global "chart" .Chart ) }} */}} {{- define "comet-common.images.image" -}} {{- $registryName := default .imageRoot.registry ((.global).imageRegistry) -}} @@ -27,7 +27,7 @@ If image tag and digest are not defined, termination fallbacks to chart appVersi {{/* Return the proper Docker Image Registry Secret Names (deprecated: use comet-common.images.renderPullSecrets instead) -{{ include "comet-common.images.pullSecrets" ( dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "global" .Values.global) }} + {{ include "comet-common.images.pullSecrets" ( dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "global" .Values.global) }} */}} {{- define "comet-common.images.pullSecrets" -}} {{- $pullSecrets := list }} @@ -60,7 +60,7 @@ imagePullSecrets: {{/* Return the proper Docker Image Registry Secret Names evaluating values as templates -{{ include "comet-common.images.renderPullSecrets" ( dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "context" $) }} + {{ include "comet-common.images.renderPullSecrets" ( dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "context" $) }} */}} {{- define "comet-common.images.renderPullSecrets" -}} {{- $pullSecrets := list }} @@ -94,7 +94,7 @@ imagePullSecrets: {{/* Return the proper image version (ingores image revision/prerelease info & fallbacks to chart appVersion) -{{ include "comet-common.images.version" ( dict "imageRoot" .Values.path.to.the.image "chart" .Chart ) }} + {{ include "comet-common.images.version" ( dict "imageRoot" .Values.path.to.the.image "chart" .Chart ) }} */}} {{- define "comet-common.images.version" -}} {{- $imageTag := .imageRoot.tag | toString -}} diff --git a/templates/_labels.tpl b/templates/_labels.tpl index 70c1ec3..be2746b 100644 --- a/templates/_labels.tpl +++ b/templates/_labels.tpl @@ -1,8 +1,8 @@ {{/* Component label -{{ include "comet-common.labels.component" . -}} -{{ include "comet-common.labels.component" (dict "componentName" .Values.componentName "context" $) -}} + {{ include "comet-common.labels.component" . -}} + {{ include "comet-common.labels.component" (dict "componentName" .Values.componentName "context" $) -}} */}} {{- define "comet-common.labels.component" -}} {{- if not (empty .componentName) -}} @@ -15,7 +15,7 @@ app.kubernetes.io/component: {{ include "comet-common.names.name" (ternary .cont {{/* Kubernetes base labels -{{ include "comet-common.labels.base" (dict "customLabels" .Values.commonLabels "context" $) -}} + {{ include "comet-common.labels.base" (dict "customLabels" .Values.commonLabels "context" $) -}} */}} {{- define "comet-common.labels.base" -}} {{- if and (hasKey . "customLabels") (hasKey . "context") -}} @@ -38,9 +38,9 @@ app.kubernetes.io/version: {{ . | replace "+" "_" | quote }} {{/* Common labels -{{ include "comet-common.labels" . -}} + {{ include "comet-common.labels" . -}} or -{{ include "comet-common.labels" (dict "componentName" .Values.componentName "customLabels" .Values.commonLabels "context" $) -}} + {{ include "comet-common.labels" (dict "componentName" .Values.componentName "customLabels" .Values.commonLabels "context" $) -}} */}} {{- define "comet-common.labels" -}} {{ include "comet-common.labels.base" . }} @@ -50,9 +50,9 @@ or {{/* Selector labels -{{ include "comet-common.selectorLabels" . -}} + {{ include "comet-common.selectorLabels" . -}} or -{{ include "comet-common.selectorLabels" (dict "componentName" .Values.componentName "customLabels" .Values.commonLabels "context" $) -}} + {{ include "comet-common.selectorLabels" (dict "componentName" .Values.componentName "customLabels" .Values.commonLabels "context" $) -}} */}} {{- define "comet-common.selectorLabels" -}} {{- if and (hasKey . "customLabels") (hasKey . "context") -}} diff --git a/templates/_tplvals.tpl b/templates/_tplvals.tpl index c1c4c34..32a1dc6 100644 --- a/templates/_tplvals.tpl +++ b/templates/_tplvals.tpl @@ -2,8 +2,8 @@ Renders a value that contains template perhaps with scope if the scope is present. Usage: -{{ include "comet-common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $ ) }} -{{ include "comet-common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $ "scope" $app ) }} + {{ include "comet-common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $ ) }} + {{ include "comet-common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $ "scope" $app ) }} */}} {{- define "comet-common.tplvalues.render" -}} {{- $value := typeIs "string" .value | ternary .value (.value | toYaml) }} @@ -23,7 +23,7 @@ Merge a list of values that contains template after rendering them. Merge precedence is consistent with http://masterminds.github.io/sprig/dicts.html#merge-mustmerge Usage: -{{ include "comet-common.tplvalues.merge" ( dict "values" (list .Values.path.to.the.Value1 .Values.path.to.the.Value2) "context" $ ) }} + {{ include "comet-common.tplvalues.merge" ( dict "values" (list .Values.path.to.the.Value1 .Values.path.to.the.Value2) "context" $ ) }} */}} {{- define "comet-common.tplvalues.merge" -}} {{- $dst := dict -}} @@ -38,7 +38,7 @@ Render single values or values within collections like dict or list. If dict or list contains nested collections/structures, it will recurse into them. -{{ include "comet-common.tplvalues.saferender" (dict "value" .Values.image "context" $) }} + {{ include "comet-common.tplvalues.saferender" (dict "value" .Values.image "context" $) }} */}} {{- define "comet-common.tplvalues.saferender" -}} {{- $value := .value -}}