diff --git a/helm-chart/templates/hub.yaml b/helm-chart/templates/hub.yaml index f3d0e076..cde414ee 100644 --- a/helm-chart/templates/hub.yaml +++ b/helm-chart/templates/hub.yaml @@ -97,6 +97,12 @@ spec: metadata: labels: name: hub-pod + {{ if .Values.hub.labels -}} + # Because toYaml + indent is super flaky + {{ range $key, $value := .Values.proxy.labels -}} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} spec: volumes: - name: config @@ -117,6 +123,8 @@ spec: - mountPath: /srv/jupyterhub name: hub-db-dir {{- end }} + resources: +{{ toYaml .Values.hub.resources | indent 12}} imagePullPolicy: IfNotPresent env: # Put this here directly so hub will restart when we diff --git a/helm-chart/templates/proxy.yaml b/helm-chart/templates/proxy.yaml index 7296589f..845a098e 100644 --- a/helm-chart/templates/proxy.yaml +++ b/helm-chart/templates/proxy.yaml @@ -51,10 +51,18 @@ spec: metadata: labels: name: proxy-pod + {{ if .Values.proxy.labels -}} + # Because toYaml + indent is super flaky + {{ range $key, $value := .Values.proxy.labels -}} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} spec: containers: - name: proxy-container image: {{ .Values.proxy.image.name }}:{{ .Values.proxy.image.tag }} + resources: +{{ toYaml .Values.proxy.resources | indent 12 }} env: - name: CONFIGPROXY_AUTH_TOKEN valueFrom: diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index 5b6f7c14..dc57615d 100644 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -18,14 +18,24 @@ hub: db: type: sqlite-pvc url: null + labels: null image: name: yuvipanda/jupyterhub-kubernetes-hub tag: v0.2 + resources: + requests: + cpu: 0.5 + memory: 1Gi proxy: image: name: yuvipanda/jupyterhub-kubernetes-proxy tag: v0.1 + resources: + requests: + cpu: 1 + memory: 1Gi + labels: null # Set this explicitly if you want to use a static allocated # IP as the public LoadBalancer IP. Requires support by