mirror of
https://github.com/bitnami/charts.git
synced 2026-03-06 15:10:15 +08:00
* [bitnami/haproxy] Add chart * Requested changes * Requested changes * [bitnami/haproxy] Update components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Co-authored-by: Bitnami Containers <containers@bitnami.com>
60 lines
1.7 KiB
Smarty
60 lines
1.7 KiB
Smarty
{{/*
|
|
Return the proper haproxy image name
|
|
*/}}
|
|
{{- define "haproxy.image" -}}
|
|
{{ include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Get the configmap name
|
|
*/}}
|
|
{{- define "haproxy.configMapName" -}}
|
|
{{- if .Values.existingConfigmap -}}
|
|
{{- printf "%s" .Values.existingConfigmap -}}
|
|
{{- else -}}
|
|
{{- include "common.names.fullname" . -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Return the proper Docker Image Registry Secret Names
|
|
*/}}
|
|
{{- define "haproxy.imagePullSecrets" -}}
|
|
{{- include "common.images.pullSecrets" (dict "images" (list .Values.image) "global" .Values.global) -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Create the name of the service account to use
|
|
*/}}
|
|
{{- define "haproxy.serviceAccountName" -}}
|
|
{{- if .Values.serviceAccount.create -}}
|
|
{{ default (printf "%s-foo" (include "common.names.fullname" .)) .Values.serviceAccount.name }}
|
|
{{- else -}}
|
|
{{ default "default" .Values.serviceAccount.name }}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Compile all warnings into a single message.
|
|
*/}}
|
|
{{- define "haproxy.validateValues" -}}
|
|
{{- $messages := list -}}
|
|
{{- $messages := append $messages (include "haproxy.validateValues.ports" .) -}}
|
|
{{- $messages := without $messages "" -}}
|
|
{{- $message := join "\n" $messages -}}
|
|
|
|
{{- if $message -}}
|
|
{{- printf "\nVALUES VALIDATION:\n%s" $message -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{- define "haproxy.validateValues.ports" -}}
|
|
{{- if not .Values.containerPorts }}
|
|
haproxy: No container ports
|
|
HAProxy should at least expose container ports. Please configure the containerPorts values using the following structure.
|
|
containerPorts:
|
|
- name: <NAME OF THE PORT>
|
|
containerPort: <PORT NUMBER>
|
|
{{- end }}
|
|
{{- end }}
|