librnms-helm-charts/charts/librenms/templates/rrdcached-deployment.yml
2024-07-03 21:29:02 +02:00

62 lines
1.9 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-rrdcached
spec:
strategy:
type: Recreate
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: {{ .Release.Name }}
app.kubernetes.io/instance: rrdcached
template:
metadata:
labels:
app.kubernetes.io/name: {{ .Release.Name }}
app.kubernetes.io/instance: rrdcached
spec:
securityContext:
fsGroup: 1000
volumes:
{{- if .Values.librenms.rrdcached.persistence.enabled }}
- name: db
persistentVolumeClaim:
claimName: {{ .Release.Name }}-rrdcached
- name: journal
persistentVolumeClaim:
claimName: {{ .Release.Name }}-rrdcached-journal
{{end}}
- name: mysql
secret:
secretName: {{ .Release.Name }}-mysql
optional: false # default setting; "mysecret" must exist
containers:
- name: rrdcached
image: '{{ .Values.librenms.rrdcached.image.repository }}:{{ .Values.librenms.rrdcached.image.tag }}'
imagePullPolicy: Always
{{- if .Values.librenms.rrdcached.persistence.enabled }}
volumeMounts:
- name: db
mountPath: /data/db
- name: journal
mountPath: /data/journal
- name: mysql
mountPath: "/opt/mysql/"
readOnly: true
{{end}}
env:
{{- with .Values.librenms.rrdcached.envs }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.librenms.rrdcached.extraEnvs }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.librenms.rrdcached.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- if .Values.librenms.rrdcached.resources }}
resources: {{ toYaml .Values.librenms.rrdcached.resources | nindent 10 }}
{{- end }}