mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
feat(common): Release 3.5.0 (#357)
Co-authored-by: Lawrence Gil <lawrence.gil@assemblyglobal.com>
This commit is contained in:
parent
5a722abfa9
commit
90e6b9e7cf
42 changed files with 1092 additions and 164 deletions
|
@ -7,6 +7,6 @@ Return a configMap Object by its Identifier.
|
|||
|
||||
{{- $configMapValues := dig $identifier nil $rootContext.Values.configMaps -}}
|
||||
{{- if not (empty $configMapValues) -}}
|
||||
{{- include "bjw-s.common.lib.configMap.valuesToObject" (dict "rootContext" $rootContext "id" $identifier "values" $configMapValues) -}}
|
||||
{{- include "bjw-s.common.lib.valuesToObject" (dict "rootContext" $rootContext "id" $identifier "values" $configMapValues) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -4,4 +4,8 @@ Validate configMap values
|
|||
{{- define "bjw-s.common.lib.configMap.validate" -}}
|
||||
{{- $rootContext := .rootContext -}}
|
||||
{{- $configMapValues := .object -}}
|
||||
|
||||
{{- if and (empty (get $configMapValues "data")) (empty (get $configMapValues "binaryData")) -}}
|
||||
{{- fail (printf "No data or binaryData specified for configMap. (configMap: %s)" $configMapValues.identifier) }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
{{/*
|
||||
Convert configMap values to an object
|
||||
*/}}
|
||||
{{- define "bjw-s.common.lib.configMap.valuesToObject" -}}
|
||||
{{- $rootContext := .rootContext -}}
|
||||
{{- $identifier := .id -}}
|
||||
{{- $objectValues := .values -}}
|
||||
|
||||
{{- /* Determine and inject the configMap name */ -}}
|
||||
{{- $objectName := (include "bjw-s.common.lib.chart.names.fullname" $rootContext) -}}
|
||||
|
||||
{{- if $objectValues.nameOverride -}}
|
||||
{{- $override := tpl $objectValues.nameOverride $rootContext -}}
|
||||
{{- if not (eq $objectName $override) -}}
|
||||
{{- $objectName = printf "%s-%s" $objectName $override -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- if not (eq $objectName $identifier) -}}
|
||||
{{- $objectName = printf "%s-%s" $objectName $identifier -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $_ := set $objectValues "name" $objectName -}}
|
||||
{{- $_ := set $objectValues "identifier" $identifier -}}
|
||||
|
||||
{{- /* Return the configMap object */ -}}
|
||||
{{- $objectValues | toYaml -}}
|
||||
{{- end -}}
|
Loading…
Add table
Add a link
Reference in a new issue