github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/cert-manager-webhook-oci/templates/_helpers.tpl (about) 1 # Portions of the code in this file are derived from https://github.com/cert-manager/webhook-example/blob/master/deploy/example-webhook/templates/_helpers.tpl 2 # Portions of the code in this file are derived from https://gitlab.com/dn13/cert-manager-webhook-oci/-/blob/1.1.0/deploy/cert-manager-webhook-oci/templates/_helpers.tpl 3 4 {{/* vim: set filetype=mustache: */}} 5 {{/* 6 Expand the name of the chart. 7 */}} 8 {{- define "cert-manager-webhook-oci.name" -}} 9 {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} 10 {{- end -}} 11 12 {{/* 13 Create a default fully qualified app name. 14 We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 15 If release name contains chart name it will be used as a full name. 16 */}} 17 {{- define "cert-manager-webhook-oci.fullname" -}} 18 {{- if .Values.fullnameOverride -}} 19 {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} 20 {{- else -}} 21 {{- $name := default .Chart.Name .Values.nameOverride -}} 22 {{- if contains $name .Release.Name -}} 23 {{- .Release.Name | trunc 63 | trimSuffix "-" -}} 24 {{- else -}} 25 {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} 26 {{- end -}} 27 {{- end -}} 28 {{- end -}} 29 30 {{/* 31 Default the Cert-Manager clusterResourceNamespace to the Cert-Manager namespace if not explicitly set 32 */}} 33 {{- define "cert-manager-webhook-oci.clusterResourceNamespace" -}} 34 {{- if .Values.certManager.clusterResourceNamespace -}} 35 {{- printf "%s" .Values.certManager.clusterResourceNamespace -}} 36 {{- else -}} 37 {{- printf "%s" .Values.certManager.namespace -}} 38 {{- end -}} 39 {{- end -}} 40 41 {{/* 42 Create chart name and version as used by the chart label. 43 */}} 44 {{- define "cert-manager-webhook-oci.chart" -}} 45 {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} 46 {{- end -}} 47 48 {{- define "cert-manager-webhook-oci.selfSignedIssuer" -}} 49 {{ printf "%s-selfsign" (include "cert-manager-webhook-oci.fullname" .) }} 50 {{- end -}} 51 52 {{- define "cert-manager-webhook-oci.rootCAIssuer" -}} 53 {{ printf "%s-ca" (include "cert-manager-webhook-oci.fullname" .) }} 54 {{- end -}} 55 56 {{- define "cert-manager-webhook-oci.rootCACertificate" -}} 57 {{ printf "%s-ca" (include "cert-manager-webhook-oci.fullname" .) }} 58 {{- end -}} 59 60 {{- define "cert-manager-webhook-oci.servingCertificate" -}} 61 {{ printf "%s-webhook-tls" (include "cert-manager-webhook-oci.fullname" .) }} 62 {{- end -}} 63