diff --git a/charts/jupyterhub-2.0.0.tgz b/charts/jupyterhub-2.0.0.tgz index b3238d0..4178db1 100644 Binary files a/charts/jupyterhub-2.0.0.tgz and b/charts/jupyterhub-2.0.0.tgz differ diff --git a/charts/jupyterhub/templates/hub/deployment.yaml b/charts/jupyterhub/templates/hub/deployment.yaml index d6e1c63..c5a94a4 100755 --- a/charts/jupyterhub/templates/hub/deployment.yaml +++ b/charts/jupyterhub/templates/hub/deployment.yaml @@ -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 }} diff --git a/charts/jupyterhub/values.yaml b/charts/jupyterhub/values.yaml index 60c6d39..1ad23a5 100755 --- a/charts/jupyterhub/values.yaml +++ b/charts/jupyterhub/values.yaml @@ -78,6 +78,7 @@ hub: storageClassName: # url: mysql+pymysql://${USERNAME}:${PASSWORD}@${MYSQL-ADDRESS}:${MYSQL-PORT}/bioos url: mysql+pymysql://root:Bytedance2023@mysql.bioos.svc.cluster.local:3306/bioos +# username: root password: Bytedance2023 labels: {} annotations: {}