mirror of
https://github.com/truecharts/library-charts.git
synced 2026-07-03 02:29:15 -03:00
fix(credentials): allow credentials to be defined as credentialsList
This commit is contained in:
@@ -15,7 +15,7 @@ maintainers:
|
||||
name: common
|
||||
sources: null
|
||||
type: library
|
||||
version: 21.0.0
|
||||
version: 21.0.1
|
||||
annotations:
|
||||
artifacthub.io/category: "integration-delivery"
|
||||
artifacthub.io/license: "BUSL-1.1"
|
||||
|
||||
@@ -10,14 +10,10 @@
|
||||
|
||||
{{- include "tc.v1.common.values.ingressList" . -}}
|
||||
|
||||
{{- include "tc.v1.common.values.backupStorageLocationList" . -}}
|
||||
|
||||
{{- include "tc.v1.common.values.volumeSnapshotLocationList" . -}}
|
||||
|
||||
{{- include "tc.v1.common.values.volumeSnapshotList" . -}}
|
||||
|
||||
{{- include "tc.v1.common.values.volumeSnapshotClassList" . -}}
|
||||
|
||||
{{- include "tc.v1.common.values.schedulesList" . -}}
|
||||
{{- include "tc.v1.common.values.credentialsList" . -}}
|
||||
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
{{- define "tc.v1.common.values.backupStorageLocationList" -}}
|
||||
{{- $rootCtx := . -}}
|
||||
|
||||
{{- range $idx, $bslValues := $rootCtx.Values.backupStorageLocationList -}}
|
||||
|
||||
{{- $name := (printf "bsl-list-%s" (toString $idx)) -}}
|
||||
|
||||
{{- with $bslValues.name -}}
|
||||
{{- $name = . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if not (hasKey $rootCtx.Values "backupStorageLocation") -}}
|
||||
{{- $_ := set $rootCtx.Values "backupStorageLocation" dict -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $_ := set $rootCtx.Values.backupStorageLocation $name $bslValues -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
18
library/common/templates/values/lists/_credentialsList.tpl
Normal file
18
library/common/templates/values/lists/_credentialsList.tpl
Normal file
@@ -0,0 +1,18 @@
|
||||
{{- define "tc.v1.common.values.credentialsList" -}}
|
||||
{{- $rootCtx := . -}}
|
||||
|
||||
{{- range $idx, $credsValues := $rootCtx.Values.credentialsList -}}
|
||||
|
||||
{{- $name := (printf "vs-list-%s" (toString $idx)) -}}
|
||||
|
||||
{{- with $credsValues.name -}}
|
||||
{{- $name = . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if not (hasKey $rootCtx.Values "credentials") -}}
|
||||
{{- $_ := set $rootCtx.Values "credentials" dict -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $_ := set $rootCtx.Values.credentials $name $credsValues -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -1,18 +0,0 @@
|
||||
{{- define "tc.v1.common.values.schedulesList" -}}
|
||||
{{- $rootCtx := . -}}
|
||||
|
||||
{{- range $idx, $scheduleValues := $rootCtx.Values.schedulesList -}}
|
||||
|
||||
{{- $name := (printf "schedules-list-%s" (toString $idx)) -}}
|
||||
|
||||
{{- with $scheduleValues.name -}}
|
||||
{{- $name = . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if not (hasKey $rootCtx.Values "schedules") -}}
|
||||
{{- $_ := set $rootCtx.Values "schedules" dict -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $_ := set $rootCtx.Values.schedules $name $scheduleValues -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -1,18 +0,0 @@
|
||||
{{- define "tc.v1.common.values.volumeSnapshotLocationList" -}}
|
||||
{{- $rootCtx := . -}}
|
||||
|
||||
{{- range $idx, $vslValues := $rootCtx.Values.volumeSnapshotLocationList -}}
|
||||
|
||||
{{- $name := (printf "vs-list-%s" (toString $idx)) -}}
|
||||
|
||||
{{- with $vslValues.name -}}
|
||||
{{- $name = . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if not (hasKey $rootCtx.Values "volumeSnapshotLocation") -}}
|
||||
{{- $_ := set $rootCtx.Values "volumeSnapshotLocation" dict -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $_ := set $rootCtx.Values.volumeSnapshotLocation $name $vslValues -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user