From 42ab88594d5cb74466d3657fcaa39dffbed80dfa Mon Sep 17 00:00:00 2001 From: Nick Brown Date: Thu, 7 Sep 2023 15:44:02 -0600 Subject: [PATCH] Add needed volume fields in deployment and bump chart version --- charts/jupyter/Chart.yaml | 2 +- charts/jupyter/templates/deployment.yaml | 57 +++++++++++------------- charts/jupyter/values.yaml | 8 +++- 3 files changed, 35 insertions(+), 32 deletions(-) diff --git a/charts/jupyter/Chart.yaml b/charts/jupyter/Chart.yaml index 550baf4..1b81872 100644 --- a/charts/jupyter/Chart.yaml +++ b/charts/jupyter/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.0 +version: 0.3.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/jupyter/templates/deployment.yaml b/charts/jupyter/templates/deployment.yaml index f29e273..d300e94 100644 --- a/charts/jupyter/templates/deployment.yaml +++ b/charts/jupyter/templates/deployment.yaml @@ -29,47 +29,44 @@ spec: containers: - name: {{ .Chart.Name }} securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} + {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - - name: jupyter - containerPort: 8888 + - name: http + containerPort: 8000 protocol: TCP livenessProbe: httpGet: - path: /api/status - port: jupyter + path: / + port: http readinessProbe: httpGet: - path: /api/status - port: jupyter + path: / + port: http resources: - {{- toYaml .Values.resources | nindent 12 }} + {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.envVariables }} env: - - name: JUPYTER_ENABLE_LAB - value: "yes" - {{- if .Values.extraEnv }} - {{- toYaml .Values.extraEnv | nindent 12 }} - {{- end }} - {{- if .Values.command.enabled }} - command: {{ .Values.command.value }} - args: {{ .Values.command.args }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.volumeMounts }} + volumeMounts: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.volumes }} + volumes: + {{- toYaml . | nindent 8 }} {{- end }} - {{- if .Values.rootUser }} - securityContext: - allowPrivilegeEscalation: false - runAsUser: 0 - {{- end }} - {{- with .Values.nodeSelector }} + {{- with .Values.nodeSelector }} nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/jupyter/values.yaml b/charts/jupyter/values.yaml index 180c5df..98aaeaa 100644 --- a/charts/jupyter/values.yaml +++ b/charts/jupyter/values.yaml @@ -84,4 +84,10 @@ affinity: {} runtimeClassName: "nvidia" -rootUser: true \ No newline at end of file +rootUser: true + +volumes: [] + +volumeMounts: [] + +envVariables: []