Browse Source

Added persistency to Helm chart

master
Gyulai Dániel 4 years ago
parent
commit
f6bd7bde16
  1. 33
      helm/covidok/templates/minio.yaml
  2. 24
      helm/covidok/templates/mysql.yaml
  3. 5
      helm/covidok/values.yaml

33
helm/covidok/templates/minio.yaml

@ -45,3 +45,36 @@ spec:
name: minio
command: ["minio"]
args: ["server", "/data"]
livenessProbe:
httpGet:
path: /minio/health/live
port: 9000
scheme: HTTP
initialDelaySeconds: 120
periodSeconds: 15
timeoutSeconds: 10
successThreshold: 1
failureThreshold: 3
{{ if .Values.persistence.enabled }}
volumeMounts:
- name: minio-data
mountPath: /data
volumes:
- name: minio-data
persistentVolumeClaim:
claimName: minio-pvc-{{ .Release.Name }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: minio-pvc-{{ .Release.Name }}
labels:
{{- include "covidok.labels" . | nindent 4 }}
spec:
storageClassName: {{ .Values.persistence.storageClass }}
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .Values.persistence.claimSize }}
{{ end }}

24
helm/covidok/templates/mysql.yaml

@ -48,3 +48,27 @@ spec:
ports:
- containerPort: 3306
name: mysql
{{ if .Values.persistence.enabled }}
volumeMounts:
- name: mysql-data
mountPath: /var/lib/mysql
volumes:
- name: mysql-data
persistentVolumeClaim:
claimName: mysql-pvc-{{ .Release.Name }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-pvc-{{ .Release.Name }}
labels:
{{- include "covidok.labels" . | nindent 4 }}
spec:
storageClassName: {{ .Values.persistence.storageClass }}
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .Values.persistence.claimSize }}
{{ end }}

5
helm/covidok/values.yaml

@ -16,7 +16,6 @@ images:
name: redis
tag: 6
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
config:
minio:
@ -28,6 +27,10 @@ config:
password: "covidok"
redis:
port: "6379"
persistence:
enabled: false
#storageClass:
#claimSize:
imagePullSecrets: []

Loading…
Cancel
Save