Skip to content

Commit

Permalink
set dbconnectstring value for jhub #21
Browse files Browse the repository at this point in the history
  • Loading branch information
goseind committed Feb 13, 2023
1 parent 95f1605 commit ac6c0c4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
5 changes: 1 addition & 4 deletions iac/tf/cluster/jhub/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
# Available chart versions: https://jupyterhub.github.io/helm-chart/
#

hub:
db:
type: sqlite-memory # change to postgres ref.: https://z2jh.jupyter.org/en/stable/resources/reference.html?highlight=database#hub-db-type

proxy:
service:
type: LoadBalancer
Expand All @@ -25,3 +21,4 @@ proxy:
singleuser:
storage:
type: none

7 changes: 6 additions & 1 deletion iac/tf/cluster/main-helm.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ resource "helm_release" "rucio-daemons-chart" {

set {
name = "config.database.default"
value = data.kubernetes_secret_v1.rucio_db_secret.data.dbconnectstring
value = data.kubernetes_secret_v1.jhub_db_secret.data.dbconnectstring
}
}

Expand Down Expand Up @@ -82,6 +82,11 @@ resource "helm_release" "jupyterhub-chart" {
values = [
"${file("jhub/config.yaml")}"
]

set {
name = "hub.db.url"
value = data.kubernetes_secret_v1.rucio_db_secret.data.dbconnectstring
}
}

# Reana
Expand Down
7 changes: 7 additions & 0 deletions iac/tf/cluster/main-k8s.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ data "kubernetes_secret_v1" "rucio_db_secret" {
}
}

data "kubernetes_secret_v1" "jhub_db_secret" {
metadata {
name = "jhub-cvre-dbconnectstring"
namespace = "jhub"
}
}

# Kubernetes Resources

# Namespaces
Expand Down

0 comments on commit ac6c0c4

Please sign in to comment.