mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 00:47:04 +02:00
feat(common)!: Release v3.0.0-beta4 (#282)
This commit is contained in:
parent
ea9484a7fd
commit
a27c4f6124
16 changed files with 283 additions and 157 deletions
|
@ -58,8 +58,16 @@ Returns the value for volumes
|
|||
|
||||
{{- /* configMap persistence type */ -}}
|
||||
{{- else if eq $persistenceValues.type "configMap" -}}
|
||||
{{- $objectName := (required (printf "name not set for persistence item %s" $identifier) $persistenceValues.name) -}}
|
||||
{{- $objectName = tpl $objectName $rootContext -}}
|
||||
{{- $objectName := "" -}}
|
||||
{{- if $persistenceValues.name -}}
|
||||
{{- $objectName = tpl $persistenceValues.name $rootContext -}}
|
||||
{{- else if $persistenceValues.identifier -}}
|
||||
{{- $object := (include "bjw-s.common.lib.configMap.getByIdentifier" (dict "rootContext" $rootContext "id" $persistenceValues.identifier) | fromYaml ) -}}
|
||||
{{- if not $object -}}
|
||||
{{fail (printf "No configmap found with this identifier. (persistence item '%s', identifier '%s')" $identifier $persistenceValues.identifier)}}
|
||||
{{- end -}}
|
||||
{{- $objectName = $object.name -}}
|
||||
{{- end -}}
|
||||
{{- $_ := set $volume "configMap" dict -}}
|
||||
{{- $_ := set $volume.configMap "name" $objectName -}}
|
||||
{{- with $persistenceValues.defaultMode -}}
|
||||
|
@ -71,8 +79,16 @@ Returns the value for volumes
|
|||
|
||||
{{- /* Secret persistence type */ -}}
|
||||
{{- else if eq $persistenceValues.type "secret" -}}
|
||||
{{- $objectName := (required (printf "name not set for persistence item %s" $identifier) $persistenceValues.name) -}}
|
||||
{{- $objectName = tpl $objectName $rootContext -}}
|
||||
{{- $objectName := "" -}}
|
||||
{{- if $persistenceValues.name -}}
|
||||
{{- $objectName = tpl $persistenceValues.name $rootContext -}}
|
||||
{{- else if $persistenceValues.identifier -}}
|
||||
{{- $object := (include "bjw-s.common.lib.secret.getByIdentifier" (dict "rootContext" $rootContext "id" $persistenceValues.identifier) | fromYaml ) -}}
|
||||
{{- if not $object -}}
|
||||
{{fail (printf "No secret found with this identifier. (persistence item '%s', identifier '%s')" $identifier $persistenceValues.identifier)}}
|
||||
{{- end -}}
|
||||
{{- $objectName = $object.name -}}
|
||||
{{- end -}}
|
||||
{{- $_ := set $volume "secret" dict -}}
|
||||
{{- $_ := set $volume.secret "secretName" $objectName -}}
|
||||
{{- with $persistenceValues.defaultMode -}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue