diff --git a/charts/enterprise/clusterissuer/Chart.yaml b/charts/enterprise/clusterissuer/Chart.yaml index d2cd34f14c8..ff24c89e8c9 100644 --- a/charts/enterprise/clusterissuer/Chart.yaml +++ b/charts/enterprise/clusterissuer/Chart.yaml @@ -1,7 +1,7 @@ kubeVersion: '>=1.24.0-0' apiVersion: v2 name: clusterissuer -version: 4.2.14 +version: 5.0.0 appVersion: latest description: Certificate management for Kubernetes home: https://truecharts.org/charts/enterprise/clusterissuer @@ -19,13 +19,13 @@ keywords: - cert-manager - certificates dependencies: - - name: common - version: 14.5.0 - repository: https://library-charts.truecharts.org - condition: "" - alias: "" - tags: [] - import-values: [] + - name: common + version: 16.2.4 + repository: https://library-charts.truecharts.org + condition: "" + alias: "" + tags: [] + import-values: [] annotations: max_scale_version: 23.10.2 min_scale_version: 23.10.0 diff --git a/charts/enterprise/clusterissuer/templates/clusterissuer/_clusterCertificates.tpl b/charts/enterprise/clusterissuer/templates/clusterissuer/_clusterCertificates.tpl index 86ff731b3fb..a1e06520730 100644 --- a/charts/enterprise/clusterissuer/templates/clusterissuer/_clusterCertificates.tpl +++ b/charts/enterprise/clusterissuer/templates/clusterissuer/_clusterCertificates.tpl @@ -1,8 +1,7 @@ {{- define "certmanager.clusterissuer.clusterCertificates" -}} {{- if .Values.clusterCertificates -}} - {{- $certs := dict -}} {{- $secretTemplates := dict -}} - {{- $certNamespace := (include "tc.v1.common.lib.metadata.namespace" (dict "rootCtx" $ "objectData" $certs "caller" "ClusterCertificates")) -}} + {{- $certNamespace := (include "tc.v1.common.lib.metadata.namespace" (dict "rootCtx" $ "objectData" dict "caller" "ClusterCertificates")) -}} {{- $replicationNamespaces := ".*" -}} {{- if .Values.clusterCertificates.replicationNamespaces -}} {{- $replicationNamespaces = .Values.clusterCertificates.replicationNamespaces -}} @@ -18,18 +17,18 @@ {{- $_ := set $secretTemplates "annotations" $certAnnotations -}} - {{- range .Values.clusterCertificates.certificates -}} - {{- $_ := set $certs .name dict -}} - {{- $currentCert := (index $certs (.name)) -}} - {{- $_ := set $currentCert "enabled" .enabled -}} - {{- $_ := set $currentCert "nameOverride" .name -}} - {{- $_ := set $currentCert "hosts" .hosts -}} - {{- $_ := set $currentCert "certificateIssuer" .certificateIssuer -}} - {{- $_ := set $currentCert "secretTemplate" $secretTemplates -}} + {{- if not $.Values.certificate -}} + {{- $_ := set $.Values "certificate" dict -}} + {{- end -}} + + {{- range .Values.clusterCertificates.certificates -}} + {{- $_ := set $.Values.certificate .name (dict + "enabled" .enabled + "hosts" .hosts + "certificateIssuer" .certificateIssuer + "certificateSecretTemplate" $secretTemplates + ) -}} {{- end -}} - {{- $_ := set .Values "cert" $certs -}} - {{/* Render the ClusterWide Certificate(s) */}} - {{- include "tc.v1.common.spawner.certificate" . | nindent 0 -}} {{- end -}} {{- end -}} diff --git a/charts/enterprise/clusterissuer/templates/common.yaml b/charts/enterprise/clusterissuer/templates/common.yaml index 8d713d12f0f..494bfc898d5 100644 --- a/charts/enterprise/clusterissuer/templates/common.yaml +++ b/charts/enterprise/clusterissuer/templates/common.yaml @@ -1,14 +1,16 @@ {{/* Make sure all variables are set properly */}} {{- include "tc.v1.common.loader.init" . }} +{{/* + Generate certificate data and set them to $.Values.ceritificate + Let common handle the creation of the objects +*/}} +{{- include "certmanager.clusterissuer.clusterCertificates" . }} + {{/* Render the templates */}} {{ include "tc.v1.common.loader.apply" . }} +{{/* Generate the cluster issuers */}} {{- include "certmanager.clusterissuer.acme" . }} {{- include "certmanager.clusterissuer.selfsigned" . }} {{- include "certmanager.clusterissuer.ca" . }} - -{{/* Must be called after the initial loader.apply template, - because it overrides .Values.cert in order to generate - the additional cluster-wide certificates */}} -{{- include "certmanager.clusterissuer.clusterCertificates" . }}