Skip to content

Commit

Permalink
[#39] Add support for PVC
Browse files Browse the repository at this point in the history
  • Loading branch information
blackandred committed Nov 12, 2021
1 parent 7db3570 commit bd3ea31
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 5 deletions.
9 changes: 9 additions & 0 deletions k8s/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ spec:
hostPath:
path: /proc
type: Directory
{{- if .Values.dbVolume.enabled }}
- name: database
persistentVolumeClaim:
claimName: {{ .Release.Name }}-database
{{- end }}
{{- end }}

{{- with .Values.deployment.nodeSelector }}
Expand Down Expand Up @@ -100,6 +105,10 @@ spec:
- name: proc
mountPath: /proc-host
{{- end }}
{{- if .Values.dbVolume.enabled }}
- name: database
mountPath: /database
{{- end }}
env:
- name: REFRESH_TIME
value: "{{ .Values.settings.refresh_time }}"
Expand Down
17 changes: 17 additions & 0 deletions k8s/templates/volume.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- if .Values.dbVolume.enabled }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Release.Name }}-database
spec:
storageClassName: "{{ .Values.dbVolume.storageClassName }}"
{{- with .Values.dbVolume.volumeName }}
volumeName: "{{ . }}"
{{- end }}
accessModes:
- {{ .Values.dbVolume.accessMode}}
resources:
requests:
storage: {{ .Values.dbVolume.requests }}
{{ end }}
17 changes: 12 additions & 5 deletions k8s/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,18 @@ deployment:
isPrivileged: true

settings:
refresh_time: "300" # interval between refreshing all checks
wait_time: "0" # time in seconds between two checks are running
check_timeout: "120" # timeout on every check
secret_code: "change-me-please"
log_level: "info"
refresh_time: "300" # interval between refreshing all checks
wait_time: "0" # time in seconds between two checks are running
check_timeout: "120" # timeout on every check
secret_code: "change-me-please" # --server-path-prefix
log_level: "info" # --log-level

dbVolume:
enabled: true
storageClassName: ""
#volumeName: ""
requests: 15Mi
accessMode: ReadWriteOncePod

ingress:
enabled: true
Expand Down

0 comments on commit bd3ea31

Please sign in to comment.