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}} {{- if .Values.mysql.enabled }} - name: mysql secret: secretName: {{ .Release.Name }}-mysql optional: false # default setting; "mysecret" must exist {{- end }} 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 {{- if .Values.mysql.enabled }} - name: mysql mountPath: "/opt/mysql/" readOnly: true {{- end }} {{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 }}