home-server-helm/templates/deployment.yaml
2023-11-12 16:02:19 -05:00

55 lines
1.4 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.name }}
labels:
app: {{ .Values.name }}
spec:
replicas: {{ .Values.replicas }}
strategy:
type: {{ .Values.strategy | default "RollingUpdate" }}
selector:
matchLabels:
app: {{ .Values.name }}
template:
metadata:
labels:
app: {{ .Values.name }}
spec:
containers:
- name: {{ .Values.name }}
imagePullPolicy: {{ .Values.image.imagePullPolicy | default "IfNotPresent" }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
{{- with .Values.ports}}
ports:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.lifecycle}}
lifecycle:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.volumeMounts}}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.resources}}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.env }}
env:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.args}}
args:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.volumes}}
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.nodeName}}
nodeName: {{ . }}
{{- end }}