Skip to content

Commit

Permalink
Merge pull request #5 from Bio-OS/develop
Browse files Browse the repository at this point in the history
jupyterhub add initcontainer
  • Loading branch information
Jeson-zhou authored Oct 26, 2023
2 parents 2fb171b + 87129db commit 7e155d7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
Binary file modified charts/jupyterhub-2.0.0.tgz
Binary file not shown.
15 changes: 12 additions & 3 deletions charts/jupyterhub/templates/hub/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,19 @@ spec:
{{- with include "jupyterhub.imagePullSecrets" (dict "root" . "image" .Values.hub.image) }}
imagePullSecrets: {{ . }}
{{- end }}
{{- with .Values.hub.initContainers }}
{{/* {{- with .Values.hub.initContainers }}*/}}
initContainers:
{{- . | toYaml | nindent 8 }}
{{- end }}
- name: "dbInit"
env:
- name: MYSQL_PASSWORD
value: {{ .Values.hub.db.password }}
image: bitnami/mysql:8.0.34-debian-11-r75
command:
- /bin/sh
- -c
- mysql -u root -h mysql.bioos.svc.cluster.local -p"${MYSQL_PASSWORD}" -e "CREATE DATABASE IF NOT EXISTS bioos;" || exit 1
{{/* {{- . | toYaml | nindent 8 }}*/}}
{{/* {{- end }}*/}}
containers:
{{- with .Values.hub.extraContainers }}
{{- . | toYaml | nindent 8 }}
Expand Down
1 change: 1 addition & 0 deletions charts/jupyterhub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ hub:
storageClassName:
# url: mysql+pymysql://${USERNAME}:${PASSWORD}@${MYSQL-ADDRESS}:${MYSQL-PORT}/bioos
url: mysql+pymysql://root:[email protected]:3306/bioos
# username: root
password: Bytedance2023
labels: {}
annotations: {}
Expand Down

0 comments on commit 7e155d7

Please sign in to comment.