diff --git a/library/common-test/Chart.yaml b/library/common-test/Chart.yaml index 9369a52b..cf19bfe9 100644 --- a/library/common-test/Chart.yaml +++ b/library/common-test/Chart.yaml @@ -3,7 +3,7 @@ appVersion: "" dependencies: - name: common repository: file://../common - version: ~14.1.0 + version: ~14.2.0 deprecated: false description: Helper chart to test different use cases of the common library home: https://github.com/truecharts/apps/tree/master/charts/library/common-test diff --git a/library/common/Chart.yaml b/library/common/Chart.yaml index a5ea79a3..7ba78b22 100644 --- a/library/common/Chart.yaml +++ b/library/common/Chart.yaml @@ -15,4 +15,4 @@ maintainers: name: common sources: null type: library -version: 14.1.1 +version: 14.2.0 diff --git a/library/common/templates/class/_ingress.tpl b/library/common/templates/class/_ingress.tpl index 6f3c6c59..e5f16b91 100644 --- a/library/common/templates/class/_ingress.tpl +++ b/library/common/templates/class/_ingress.tpl @@ -124,6 +124,8 @@ spec: {{- $_ := set $cert "id" $tlsValues.scaleCert }} {{- $_ := set $cert "nameOverride" $tlsName }} secretName: {{ printf "%s-tls-%v" (include "tc.v1.common.lib.chart.names.fullname" $) $index }} + {{- else if .clusterCertificate }} + secretName: clusterissuer-templated-{{ tpl .clusterCertificate $ }} {{- else if .secretName }} secretName: {{ tpl .secretName $ | quote }} {{- end -}} diff --git a/library/common/templates/loader/_lists.tpl b/library/common/templates/loader/_lists.tpl index f1ea7ee6..fc0de770 100644 --- a/library/common/templates/loader/_lists.tpl +++ b/library/common/templates/loader/_lists.tpl @@ -6,4 +6,6 @@ {{- include "tc.v1.common.values.serviceList" . -}} + {{- include "tc.v1.common.values.ingressList" . -}} + {{- end -}} diff --git a/library/common/templates/spawner/_certificate.tpl b/library/common/templates/spawner/_certificate.tpl index 5b53390d..da3db07e 100644 --- a/library/common/templates/spawner/_certificate.tpl +++ b/library/common/templates/spawner/_certificate.tpl @@ -17,6 +17,10 @@ {{- $certName = printf "%v-%v" $certName $certValues.nameOverride -}} {{- end -}} + {{- if $certValues.certificateSecretTemplate -}} + {{- $certName = printf "%v-%v" "clusterissuer-templated" $name -}} + {{- end -}} + {{- include "tc.v1.common.class.certificate" (dict "root" $ "name" $certName "certificateIssuer" $cert.certificateIssuer "hosts" $cert.hosts "secretTemplate" $cert.secretTemplate ) -}} {{- end -}} {{- end -}} diff --git a/library/common/templates/values/lists/_ingressList.tpl b/library/common/templates/values/lists/_ingressList.tpl new file mode 100644 index 00000000..54ba2161 --- /dev/null +++ b/library/common/templates/values/lists/_ingressList.tpl @@ -0,0 +1,17 @@ +{{- define "tc.v1.common.values.ingressList" -}} + {{- $rootCtx := . -}} + + {{- range $idx, $ingressValues := $rootCtx.Values.ingressList -}} + {{- $name := (printf "ingress-list-%s" (toString $idx)) -}} + + {{- with $ingressValues.name -}} + {{- $name = . -}} + {{- end -}} + + {{- if not (hasKey $rootCtx.Values "ingress") -}} + {{- $_ := set $rootCtx.Values "ingress" dict -}} + {{- end -}} + + {{- $_ := set $rootCtx.Values.ingress $name $ingressValues -}} + {{- end -}} +{{- end -}}