Skip to content

Commit

Permalink
allow to add persistence for the docker root directory
Browse files Browse the repository at this point in the history
  • Loading branch information
splattner committed Jan 11, 2022
1 parent 2df481d commit f39d7e8
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 3 deletions.
4 changes: 2 additions & 2 deletions deploy/charts/webshell/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: webshell
description: A Helm chart to deploy a webshell environment
type: application
version: 0.1.17
appVersion: "0.1.17"
version: 0.1.18
appVersion: "0.1.18"
9 changes: 9 additions & 0 deletions deploy/charts/webshell/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ spec:
volumeMounts:
- name: shared-data
mountPath: /home/project
- name: docker-volume
mountPath: /var/lib/docker
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
Expand All @@ -107,4 +109,11 @@ spec:
claimName: {{ include "webshell.fullname" . }}
{{- else }}
emptyDir: {}
{{- end -}}
- name: docker-volume
{{- if .Values.dind.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ include "webshell.fullname" . }}-docker
{{- else }}
emptyDir: {}
{{- end -}}
17 changes: 17 additions & 0 deletions deploy/charts/webshell/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if .Values.theia.persistence.enabled -}}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
Expand All @@ -12,4 +13,20 @@ spec:
requests:
storage: "{{ .Values.theia.persistence.pvcsize }}"
storageClassName: {{ .Values.theia.persistence.storageclass }}
{{- end }}
{{- if .Values.dind.persistence.enabled -}}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "webshell.fullname" . }}-docker
labels:
{{- include "webshell.labels" . | nindent 4 }}
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: "{{ .Values.dind.persistence.pvcsize }}"
storageClassName: {{ .Values.dind.persistence.storageclass }}
{{- end }}
6 changes: 5 additions & 1 deletion deploy/charts/webshell/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ theia:
persistence:
enabled: false
pvcsize: 1Gi
storageclass: cloudscale-volume-bulk
storageclass: cloudscale-volume-ssd

init:
image:
Expand All @@ -40,6 +40,10 @@ dind:
repository: docker
tag: 20.10.11-dind
resources: {}
persistence:
enabled: false
pvcsize: 50Gi
storageclass: cloudscale-volume-ssd

imagePullSecrets: []
nameOverride: ""
Expand Down

0 comments on commit f39d7e8

Please sign in to comment.