# alternate names of the services. This renders to: [ component-svc.namespace, component-svc.namespace.svc ] {{- $altNamesKopia := list ( printf "%s-svc.%s" "data-mover" .Release.Namespace ) ( printf "%s-svc.%s.svc" "data-mover" .Release.Namespace ) }} # generate ca cert with 365 days of validity {{- $caKopia := genCA ( printf "%s-svc-ca" "data-mover" ) 365 }} # generate cert with CN="component-svc", SAN=$altNames and with 365 days of validity {{- $certKopia := genSignedCert ( printf "%s-svc" "data-mover" ) nil $altNamesKopia 365 $caKopia }} apiVersion: v1 kind: Secret type: Opaque metadata: name: kopia-tls-cert labels: {{ include "helm.labels" . | indent 4 }} {{- if .Values.global.rhMarketPlace }} annotations: "helm.sh/hook": "pre-install" {{- end }} data: tls.crt: {{ $certKopia.Cert | b64enc }} --- apiVersion: v1 kind: Secret type: Opaque metadata: name: kopia-tls-key labels: {{ include "helm.labels" . | indent 4 }} {{- if .Values.global.rhMarketPlace }} annotations: "helm.sh/hook": "pre-install" {{- end }} data: tls.key: {{ $certKopia.Key | b64enc }}