Skip to content

Commit 0fd5042

Browse files
authored
Merge pull request #3208 from yuvipanda/no-obj
Use openebs localpath provisioner for enforcing filesystem size limits
2 parents e963f30 + dd30365 commit 0fd5042

File tree

6 files changed

+45
-10
lines changed

6 files changed

+45
-10
lines changed

config/hetzner-2i2c-bare.yaml

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@ registry:
66
config:
77
storage:
88
# Uncomment this and comment out the s3 config to use filesystem
9-
# filesystem:
10-
# rootdirectory: /var/lib/registry
11-
s3:
12-
regionendpoint: https://nbg1.your-objectstorage.com
13-
bucket: mybinder-2i2c-registry
14-
region: does-not-matter
9+
filesystem:
10+
rootdirectory: /var/lib/registry
11+
# s3:
12+
# regionendpoint: https://nbg1.your-objectstorage.com
13+
# bucket: mybinder-2i2c-registry
14+
# region: does-not-matter
1515
storage:
1616
filesystem:
17-
storageClassName: "local-path"
17+
enabled: true
18+
size: 300Gi
19+
storageClassName: "openebs-hostpath"
1820
ingress:
1921
hosts:
2022
- registry.2i2c-bare.mybinder.org
@@ -81,6 +83,11 @@ binderhub:
8183
- 2i2c-bare.mybinder.org
8284

8385
jupyterhub:
86+
hub:
87+
db:
88+
pvc:
89+
storage: 1Gi
90+
storageClassName: openebs-hostpath
8491
# proxy:
8592
# chp:
8693
# resources:
@@ -123,13 +130,14 @@ grafana:
123130
access: direct
124131
isDefault: true
125132
editable: false
126-
# persistence:
127-
# storageClassName: csi-cinder-high-speed
133+
persistence:
134+
storageClassName: openebs-hostpath
128135

129136
prometheus:
130137
server:
131138
persistentVolume:
132139
size: 50Gi
140+
storageClass: openebs-hostpath
133141
retention: 30d
134142
ingress:
135143
hosts:
@@ -153,3 +161,15 @@ static:
153161
- static.2i2c-bare.mybinder.org
154162
tls:
155163
secretName: kubelego-tls-static
164+
165+
localpv-provisioner:
166+
enabled: true
167+
168+
hostpathClass:
169+
reclaimPolicy: Retain
170+
171+
xfsQuota:
172+
enabled: true
173+
174+
analytics:
175+
enabled: false

mybinder/Chart.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,8 @@ dependencies:
5757
version: 0.2.4
5858
repository: https://www.manicstreetpreacher.co.uk/binderhub-container-registry-helper/
5959
condition: binderhub-container-registry-helper.enabled
60+
61+
- name: localpv-provisioner
62+
version: 4.2.0
63+
repository: https://openebs.github.io/dynamic-localpv-provisioner
64+
condition: localpv-provisioner.enabled

mybinder/templates/registry/deployment.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,12 @@ spec:
3434
- name: registry-secret
3535
secret:
3636
secretName: registry-secret
37+
38+
{{- if .Values.registry.storage.filesystem.enabled }}
3739
- name: registry-storage
3840
persistentVolumeClaim:
3941
claimName: registry
42+
{{- end }}
4043
containers:
4144
- name: registry
4245
image: registry:3.0.0-rc.2
@@ -50,8 +53,10 @@ spec:
5053
# This path is what registry *actually* seems to read lol
5154
mountPath: /etc/docker/registry/config.yml
5255
subPath: config.yml
56+
{{- if .Values.registry.storage.filesystem.enabled }}
5357
- name: registry-storage
5458
mountPath: /var/lib/registry
59+
{{- end }}
5560
- name: registry-secret
5661
mountPath: /etc/distribution/auth.htpasswd
5762
subPath: auth.htpasswd

mybinder/templates/registry/pvc.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{{- if .Values.registry.enabled }}
2+
{{- if .Values.registry.storage.filesystem.enabled }}
23
apiVersion: v1
34
kind: PersistentVolumeClaim
45
metadata:
@@ -15,3 +16,4 @@ spec:
1516
requests:
1617
storage: {{ .Values.registry.storage.filesystem.size }}
1718
{{- end }}
19+
{{- end }}

mybinder/values.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ registry:
3232
type: ClusterIP
3333
storage:
3434
filesystem:
35+
enabled: false
3536
storageClassName: ""
36-
# Size is currently ignored- using local path provisioner
3737
size: 10Gi
3838

3939
imagePullSecrets:
@@ -722,3 +722,6 @@ awsEcrRegistryCleaner:
722722
name: binderhub-ecr-registry-cleaner
723723
annotations: {}
724724
priorityClassName: ""
725+
726+
localpv-provisioner:
727+
enabled: false

secrets/config/hetzner-2i2c-bare.yaml

8 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)