mirror of
https://github.com/bitnami/charts.git
synced 2026-03-16 06:47:30 +08:00
* [bitnami/phabricator] NEW MAJOR: migrate to non-root + good practices Signed-off-by: juan131 <juanariza@vmware.com> * Apply requested changes from code review Signed-off-by: juan131 <juanariza@vmware.com> * Use 2021 branch Signed-off-by: juan131 <juanariza@vmware.com> * Add PV + adapt probes Signed-off-by: juan131 <juanariza@vmware.com> * [bitnami/phabricator] Improve README.md Signed-off-by: juan131 <juanariza@vmware.com> * [bitnami/phabricator] Update components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Co-authored-by: Bitnami Containers <containers@bitnami.com>
122 lines
3.6 KiB
Smarty
122 lines
3.6 KiB
Smarty
{{/* vim: set filetype=mustache: */}}
|
|
|
|
{{/*
|
|
Return the proper Phabricator image name
|
|
*/}}
|
|
{{- define "phabricator.image" -}}
|
|
{{ include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Return the proper image name (for the metrics image)
|
|
*/}}
|
|
{{- define "phabricator.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 "phabricator.volumePermissions.image" -}}
|
|
{{ include "common.images.image" (dict "imageRoot" .Values.volumePermissions.image "global" .Values.global) }}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Return the proper Docker Image Registry Secret Names
|
|
*/}}
|
|
{{- define "phabricator.imagePullSecrets" -}}
|
|
{{- include "common.images.pullSecrets" (dict "images" (list .Values.image .Values.metrics.image .Values.volumePermissions.image) "global" .Values.global) -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Get the user defined LoadBalancerIP for this release.
|
|
Note, returns 127.0.0.1 if using ClusterIP.
|
|
*/}}
|
|
{{- define "phabricator.serviceIP" -}}
|
|
{{- if eq .Values.service.type "ClusterIP" -}}
|
|
127.0.0.1
|
|
{{- else -}}
|
|
{{- .Values.service.loadBalancerIP | default "" -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Gets the host to be used for this application.
|
|
If not using ClusterIP, or if a host or LoadBalancerIP is not defined, the value will be empty.
|
|
*/}}
|
|
{{- define "phabricator.host" -}}
|
|
{{- if .Values.ingress.enabled }}
|
|
{{- $host := .Values.ingress.hostname | default "" -}}
|
|
{{- default (include "phabricator.serviceIP" .) $host -}}
|
|
{{- else -}}
|
|
{{- $host := index .Values (printf "%sHost" .Chart.Name) | default "" -}}
|
|
{{- default (include "phabricator.serviceIP" .) $host -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Create a default fully qualified app name.
|
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
|
*/}}
|
|
{{- define "phabricator.mariadb.fullname" -}}
|
|
{{- printf "%s-%s" .Release.Name "mariadb" | trunc 63 | trimSuffix "-" -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Return the MariaDB Hostname
|
|
*/}}
|
|
{{- define "phabricator.databaseHost" -}}
|
|
{{- if .Values.mariadb.enabled }}
|
|
{{- if eq .Values.mariadb.architecture "replication" }}
|
|
{{- printf "%s-%s" (include "phabricator.mariadb.fullname" .) "primary" | trunc 63 | trimSuffix "-" -}}
|
|
{{- else -}}
|
|
{{- printf "%s" (include "phabricator.mariadb.fullname" .) -}}
|
|
{{- end -}}
|
|
{{- else -}}
|
|
{{- printf "%s" .Values.externalDatabase.host -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Return the MariaDB Port
|
|
*/}}
|
|
{{- define "phabricator.databasePort" -}}
|
|
{{- if .Values.mariadb.enabled }}
|
|
{{- printf "3306" -}}
|
|
{{- else -}}
|
|
{{- printf "%d" (.Values.externalDatabase.port | int ) -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Return the MariaDB Root User
|
|
*/}}
|
|
{{- define "phabricator.databaseRootUser" -}}
|
|
{{- if .Values.mariadb.enabled }}
|
|
{{- printf "root" -}}
|
|
{{- else -}}
|
|
{{- printf "%s" .Values.externalDatabase.rootUser -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Return the MariaDB Secret Name
|
|
*/}}
|
|
{{- define "phabricator.databaseSecretName" -}}
|
|
{{- if .Values.mariadb.enabled }}
|
|
{{- printf "%s" (include "phabricator.mariadb.fullname" .) -}}
|
|
{{- else if .Values.externalDatabase.existingSecret -}}
|
|
{{- printf "%s" .Values.externalDatabase.existingSecret -}}
|
|
{{- else -}}
|
|
{{- printf "%s-%s" .Release.Name "externaldb" -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Check if there are rolling tags in the images
|
|
*/}}
|
|
{{- define "phabricator.checkRollingTags" -}}
|
|
{{- include "common.warnings.rollingTag" .Values.image }}
|
|
{{- include "common.warnings.rollingTag" .Values.metrics.image }}
|
|
{{- end -}}
|