Files
homelab/k8s/apps/motioneye/templates/deployment.yaml
T
2023-04-21 15:52:33 -04:00

51 lines
1.7 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: "{{ .Release.Name }}"
spec:
selector:
matchLabels:
"{{ .Release.Name }}/app": motioneye
template:
metadata:
labels:
"{{ .Release.Name }}/app": motioneye
spec:
volumes:
- name: config
configMap:
name: {{ .Release.Name }}-configs
defaultMode: 420
{{- if .Values.persistence.media_path.enabled }}
- name: media-path
persistentVolumeClaim:
claimName: {{ .Values.persistence.media_path.claimName }}
{{- end }}
{{- if .Values.persistence.conf_path.enabled }}
- name: conf-path
persistentVolumeClaim:
claimName: {{ .Values.persistence.conf_path.claimName }}
{{- end }}
containers:
- name: main
image: "{{ .Values.image }}:{{ .Values.tag | default .Chart.AppVersion }}"
resources:
{{- .Values.resources | toYaml | nindent 14}}
ports:
- containerPort: {{ .Values.conf.port }}
name: http
- containerPort: {{ .Values.conf.motion_control_port }}
name: control-port
volumeMounts:
- name: config
mountPath: /etc/motioneye/motioneye.conf
subPath: "motioneye.conf"
{{- if .Values.persistence.media_path.enabled }}
- name: media-path
mountPath: {{ .Values.conf.media_path }}
{{ end }}
{{- if .Values.persistence.conf_path.enabled }}
- name: conf-path
mountPath: {{ .Values.conf.conf_path }}
{{ end }}