diff --git a/library/common-test/ci/credentials-values.yaml b/library/common-test/ci/credentials-values.yaml new file mode 100644 index 00000000..4ee0db84 --- /dev/null +++ b/library/common-test/ci/credentials-values.yaml @@ -0,0 +1,48 @@ +service: + main: + enabled: true + primary: true + ports: + main: + enabled: true + primary: true + protocol: http + port: 8080 + +workload: + main: + enabled: true + primary: true + type: Deployment + podSpec: + containers: + main: + enabled: true + primary: true + args: + - --port + - "8080" + probes: + liveness: + enabled: true + type: http + port: "{{ .Values.service.main.ports.main.port }}" + readiness: + enabled: true + type: http + port: "{{ .Values.service.main.ports.main.port }}" + startup: + enabled: true + type: http + port: "{{ .Values.service.main.ports.main.port }}" + + +credentials: + mys3: + type: s3 + url: "" + region: "" + bucket: "" + accessKey: "" + secretKey: "" + encrKey: "" diff --git a/library/common-test/ci/credentialsList-values.yaml b/library/common-test/ci/credentialsList-values.yaml new file mode 100644 index 00000000..aa1ea290 --- /dev/null +++ b/library/common-test/ci/credentialsList-values.yaml @@ -0,0 +1,48 @@ +service: + main: + enabled: true + primary: true + ports: + main: + enabled: true + primary: true + protocol: http + port: 8080 + +workload: + main: + enabled: true + primary: true + type: Deployment + podSpec: + containers: + main: + enabled: true + primary: true + args: + - --port + - "8080" + probes: + liveness: + enabled: true + type: http + port: "{{ .Values.service.main.ports.main.port }}" + readiness: + enabled: true + type: http + port: "{{ .Values.service.main.ports.main.port }}" + startup: + enabled: true + type: http + port: "{{ .Values.service.main.ports.main.port }}" + + +credentials: + - name: mys3 + type: s3 + url: "" + region: "" + bucket: "" + accessKey: "" + secretKey: "" + encrKey: "" diff --git a/library/common/Chart.yaml b/library/common/Chart.yaml index 014c513b..65627a3e 100644 --- a/library/common/Chart.yaml +++ b/library/common/Chart.yaml @@ -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" diff --git a/library/common/templates/loader/_lists.tpl b/library/common/templates/loader/_lists.tpl index 680512b3..8595a22e 100644 --- a/library/common/templates/loader/_lists.tpl +++ b/library/common/templates/loader/_lists.tpl @@ -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 -}} diff --git a/library/common/templates/values/lists/_backupStorageLocationList.tpl b/library/common/templates/values/lists/_backupStorageLocationList.tpl deleted file mode 100644 index 50b4bb4e..00000000 --- a/library/common/templates/values/lists/_backupStorageLocationList.tpl +++ /dev/null @@ -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 -}} diff --git a/library/common/templates/values/lists/_credentialsList.tpl b/library/common/templates/values/lists/_credentialsList.tpl new file mode 100644 index 00000000..7464dc25 --- /dev/null +++ b/library/common/templates/values/lists/_credentialsList.tpl @@ -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 -}} diff --git a/library/common/templates/values/lists/_scheduleList.tpl b/library/common/templates/values/lists/_scheduleList.tpl deleted file mode 100644 index 651f998d..00000000 --- a/library/common/templates/values/lists/_scheduleList.tpl +++ /dev/null @@ -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 -}} diff --git a/library/common/templates/values/lists/_volumeSnapshotLocationList.tpl b/library/common/templates/values/lists/_volumeSnapshotLocationList.tpl deleted file mode 100644 index d264e741..00000000 --- a/library/common/templates/values/lists/_volumeSnapshotLocationList.tpl +++ /dev/null @@ -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 -}}