From a9fe0a28c7df16881ef6bb8be9b40cd71f43ba2c Mon Sep 17 00:00:00 2001 From: "Sam Wang (holyspectral)" Date: Wed, 11 Dec 2024 19:49:44 -0500 Subject: [PATCH] feat: provide a better CN for registry-adapter Originally registry-adapter's default CN uses rancher's default setting. In this commit, the installation namespace will be used to generate the certificate. --- charts/core/templates/registry-adapter-secret.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/core/templates/registry-adapter-secret.yaml b/charts/core/templates/registry-adapter-secret.yaml index 66f0d80e..3317e934 100644 --- a/charts/core/templates/registry-adapter-secret.yaml +++ b/charts/core/templates/registry-adapter-secret.yaml @@ -5,7 +5,7 @@ {{- $cert = (dict "Key" .Values.cve.adapter.certificate.key "Cert" .Values.cve.adapter.certificate.certificate ) }} {{- else }} {{- $cn := "neuvector" }} -{{- $cert = genSelfSignedCert $cn nil (list $cn "neuvector-service-registry-adapter.cattle-neuvector-system.svc.cluster.local" "neuvector-service-registry-adapter") (.Values.defaultValidityPeriod | int) -}} +{{- $cert = genSelfSignedCert $cn nil (list $cn (print "neuvector-service-registry-adapter." (default "neuvector" .Release.Namespace) ".svc.cluster.local") "neuvector-service-registry-adapter") (.Values.defaultValidityPeriod | int) -}} {{- end }} apiVersion: v1