mirror of
https://github.com/truenas/charts.git
synced 2026-11-07 00:33:13 +00:00
41 lines
1.0 KiB
Smarty
41 lines
1.0 KiB
Smarty
{{/*
|
|
Retrieve secret name for secure credentials
|
|
*/}}
|
|
{{- define "secretName" -}}
|
|
{{- print "credentials" -}}
|
|
{{- end -}}
|
|
|
|
|
|
{{/*
|
|
Retrieve true/false if certificate is configured
|
|
*/}}
|
|
{{- define "certAvailable" -}}
|
|
{{- if .Values.certificate -}}
|
|
{{- $values := (. | mustDeepCopy) -}}
|
|
{{- $_ := set $values "commonCertOptions" (dict "certKeyName" $values.Values.certificate) -}}
|
|
{{- template "common.resources.cert_present" $values -}}
|
|
{{- else -}}
|
|
{{- false -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
|
|
{{/*
|
|
Retrieve public key of certificate
|
|
*/}}
|
|
{{- define "cert.publicKey" -}}
|
|
{{- $values := (. | mustDeepCopy) -}}
|
|
{{- $_ := set $values "commonCertOptions" (dict "certKeyName" $values.Values.certificate "publicKey" true) -}}
|
|
{{ include "common.resources.cert" $values }}
|
|
{{- end -}}
|
|
|
|
|
|
{{/*
|
|
Retrieve private key of certificate
|
|
*/}}
|
|
{{- define "cert.privateKey" -}}
|
|
{{- $values := (. | mustDeepCopy) -}}
|
|
{{- $_ := set $values "commonCertOptions" (dict "certKeyName" $values.Values.certificate) -}}
|
|
{{ include "common.resources.cert" $values }}
|
|
{{- end -}}
|