feat(common)!: Release v3.0.0-beta4 (#282)

This commit is contained in:
Bernd Schorgers 2024-03-10 17:08:43 +01:00 committed by GitHub
parent ea9484a7fd
commit a27c4f6124
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 283 additions and 157 deletions

View file

@ -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 -}}