mirror of
https://github.com/truenas/charts.git
synced 2026-11-07 00:33:13 +00:00
42 lines
1.1 KiB
Smarty
42 lines
1.1 KiB
Smarty
{{/*
|
|
Retrieve deployment metadata
|
|
*/}}
|
|
{{- define "common.deployment.metadata" -}}
|
|
metadata:
|
|
name: {{ template "common.names.fullname" . }}
|
|
labels: {{ include "common.labels.selectorLabels" . | nindent 4 }}
|
|
{{- end -}}
|
|
|
|
|
|
{{/*
|
|
Retrieve replicas/strategy/selector
|
|
*/}}
|
|
{{- define "common.deployment.common_spec" -}}
|
|
replicas: {{ (default 1 .Values.replicas) }}
|
|
strategy:
|
|
type: {{ (default "Recreate" .Values.updateStrategy ) }}
|
|
selector:
|
|
matchLabels: {{ include "common.labels.selectorLabels" . | nindent 4 }}
|
|
{{- end -}}
|
|
|
|
|
|
{{/*
|
|
Retrieve deployment pod's metadata
|
|
*/}}
|
|
{{- define "common.deployment.pod.metadata" -}}
|
|
metadata:
|
|
name: {{ template "common.names.fullname" . }}
|
|
labels: {{ include "common.labels.selectorLabels" . | nindent 4 }}
|
|
annotations: {{ include "common.annotations" . | nindent 4 }}
|
|
{{- end -}}
|
|
|
|
|
|
{{/*
|
|
Retrieve common deployment configuration
|
|
*/}}
|
|
{{- define "common.deployment.common_config" -}}
|
|
apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }}
|
|
kind: Deployment
|
|
{{ include "common.deployment.metadata" . | nindent 0 }}
|
|
{{- end -}}
|