Files
charts/bitnami/dokuwiki/templates/_helpers.tpl
Daniel Arteaga c9fa3d283b [bitnami/dokuwiki] feat: add init-container for permissions (#3441)
* [bitnami/dokuwiki] feat: add init-container for permissions
* fix: move volume parameters to a new section

Signed-off-by: darteaga <darteaga@vmware.com>
2020-08-18 11:47:15 +02:00

71 lines
2.1 KiB
Smarty

{{/*
Return the proper full name
*/}}
{{- define "dokuwiki.fullname" -}}
{{- include "common.names.fullname" . -}}
{{- end -}}
{{/*
Return the proper certificate image name
*/}}
{{- define "certificates.image" -}}
{{- include "common.images.image" ( dict "imageRoot" .Values.certificates.image "global" .Values.global ) -}}
{{- end -}}
{{/*
Return the proper DokuWiki image name
*/}}
{{- define "dokuwiki.image" -}}
{{- include "common.images.image" ( dict "imageRoot" .Values.image "global" .Values.global ) -}}
{{- end -}}
{{/*
Return the proper image name (for the metrics image)
*/}}
{{- define "dokuwiki.metrics.image" -}}
{{- include "common.images.image" ( dict "imageRoot" .Values.metrics.image "global" .Values.global ) -}}
{{- end -}}
{{/*
Return the proper image name (for the init container volume-permissions image)
*/}}
{{- define "dokuwiki.volumePermissions.image" -}}
{{- include "common.images.image" ( dict "imageRoot" .Values.volumePermissions.image "global" .Values.global ) -}}
{{- end -}}
{{/*
Return the proper Docker Image Registry Secret Names
*/}}
{{- define "dokuwiki.imagePullSecrets" -}}
{{- include "common.images.pullSecrets" (dict "images" (list .Values.image .Values.metrics.image .Values.volumePermissions.image) "global" .Values.global) -}}
{{- end -}}
{{/*
Return the proper Storage Class
*/}}
{{- define "dokuwiki.storageClass" -}}
{{- include "common.storage.class" ( dict "persistence" .Values.persistence "global" .Values.global ) -}}
{{- end -}}
{{/*
Return the appropriate apiVersion for deployment.
*/}}
{{- define "dokuwiki.deployment.apiVersion" -}}
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
{{- print "extensions/v1beta1" -}}
{{- else -}}
{{- print "apps/v1" -}}
{{- end -}}
{{- end -}}
{{/* Dokuwiki credential secret name */}}
{{- define "dokuwiki.secretName" -}}
{{- coalesce .Values.existingSecret (include "dokuwiki.fullname" .) -}}
{{- end -}}
{{/* Check if there are rolling tags in the images */}}
{{- define "dokuwiki.checkRollingTags" -}}
{{- include "common.warnings.rollingTag" .Values.image -}}
{{- include "common.warnings.rollingTag" .Values.metrics.image -}}
{{- end -}}