From fa1b7da2488a1c3ce8863b3605d16545315015ff Mon Sep 17 00:00:00 2001 From: Maria Isabel Restrepo Date: Tue, 10 Jan 2023 13:33:13 -0500 Subject: [PATCH 1/8] patch: use version of infoblox that pins provider due to bug --- main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index 775076a..efdf992 100644 --- a/main.tf +++ b/main.tf @@ -50,7 +50,7 @@ resource "google_compute_address" "static" { # Assign Brown-DNS via infoblox module "production_infoblox_record" { - source = "git::https://github.com/BrownUniversity/terraform-infoblox-record-a.git?ref=v0.1.3" + source = "git::https://github.com/BrownUniversity/terraform-infoblox-record-a.git?ref=v0.1.4" record_ip = google_compute_address.static.address record_hostname = var.record_hostname record_domain = var.record_domain @@ -58,7 +58,7 @@ module "production_infoblox_record" { } module "external_infoblox_record" { - source = "git::https://github.com/BrownUniversity/terraform-infoblox-record-a.git?ref=v0.1.3" + source = "git::https://github.com/BrownUniversity/terraform-infoblox-record-a.git?ref=v0.1.4" record_ip = google_compute_address.static.address record_hostname = var.record_hostname record_domain = var.record_domain From 8a72298be67badb7c6bf6f6af95b8c3d4d454a9f Mon Sep 17 00:00:00 2001 From: Maria Isabel Restrepo Date: Wed, 11 Jan 2023 15:46:24 -0500 Subject: [PATCH 2/8] patch: pin kubernetes version to 1.24 user-scheduler stops working on 1.25 due to error - `PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget`. Thread - https://discourse.jupyter.org/t/readiness-probe-fails-on-docker-kubernetes-deploy/17517/4 --- .ruby-version | 2 +- .tool-versions | 2 +- examples/sample-jhub/values.yaml | 4 ++++ main.tf | 3 ++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.ruby-version b/.ruby-version index f716a41..b38ebbf 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.0.4-r0 \ No newline at end of file +3.0.4 \ No newline at end of file diff --git a/.tool-versions b/.tool-versions index 0a82e07..b50c332 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ terraform 1.2.5 -ruby 3.0.4-r0 +ruby 3.0.4 diff --git a/examples/sample-jhub/values.yaml b/examples/sample-jhub/values.yaml index 1bdc2b8..edb9a3e 100644 --- a/examples/sample-jhub/values.yaml +++ b/examples/sample-jhub/values.yaml @@ -1,3 +1,7 @@ +hub: + db: + pvc: + storageClassName: standard-rwo prePuller: continuous: enabled: true diff --git a/main.tf b/main.tf index efdf992..a5ac261 100644 --- a/main.tf +++ b/main.tf @@ -68,9 +68,10 @@ module "external_infoblox_record" { # Create the cluster module "jhub_cluster" { - source = "git::https://github.com/BrownUniversity/terraform-gcp-cluster.git?ref=v0.1.4" + source = "git::https://github.com/BrownUniversity/terraform-gcp-cluster.git?ref=patch-add-support-for-csi-driver" cluster_name = var.cluster_name project_id = module.jhub_project.project_id + kubernetes_version = "1.24" regional = var.regional region = var.region node_zones = [var.gcp_zone] From b2a76ab2fc71559a18afcaeeef474eafbca87b16 Mon Sep 17 00:00:00 2001 From: Maria Isabel Restrepo Date: Wed, 11 Jan 2023 15:55:38 -0500 Subject: [PATCH 3/8] build: relax ruby patch version and cap k8s --- .ruby-version | 2 +- main.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.ruby-version b/.ruby-version index b38ebbf..f398a20 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.0.4 \ No newline at end of file +3.0 \ No newline at end of file diff --git a/main.tf b/main.tf index a5ac261..913747e 100644 --- a/main.tf +++ b/main.tf @@ -71,7 +71,7 @@ module "jhub_cluster" { source = "git::https://github.com/BrownUniversity/terraform-gcp-cluster.git?ref=patch-add-support-for-csi-driver" cluster_name = var.cluster_name project_id = module.jhub_project.project_id - kubernetes_version = "1.24" + kubernetes_version = "<1.25" regional = var.regional region = var.region node_zones = [var.gcp_zone] From a534bc74d71a7218d5e9ffef4d6d50bfd86b7520 Mon Sep 17 00:00:00 2001 From: Maria Isabel Restrepo Date: Wed, 11 Jan 2023 16:05:01 -0500 Subject: [PATCH 4/8] debug(docker): fighting ruby version --- .ruby-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ruby-version b/.ruby-version index f398a20..f716a41 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.0 \ No newline at end of file +3.0.4-r0 \ No newline at end of file From 57f8d375096fcdf91f58ac65afa6903a15a841c4 Mon Sep 17 00:00:00 2001 From: Maria Isabel Restrepo Date: Wed, 11 Jan 2023 16:17:22 -0500 Subject: [PATCH 5/8] patch: k8s = 1.24.8-gke.2000 --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 913747e..3b34d19 100644 --- a/main.tf +++ b/main.tf @@ -71,7 +71,7 @@ module "jhub_cluster" { source = "git::https://github.com/BrownUniversity/terraform-gcp-cluster.git?ref=patch-add-support-for-csi-driver" cluster_name = var.cluster_name project_id = module.jhub_project.project_id - kubernetes_version = "<1.25" + kubernetes_version = "1.24.8-gke.2000" regional = var.regional region = var.region node_zones = [var.gcp_zone] From 715a195c89ca34e0d9c1b178ab74a054724797a1 Mon Sep 17 00:00:00 2001 From: Maria Isabel Restrepo Date: Wed, 11 Jan 2023 17:18:44 -0500 Subject: [PATCH 6/8] chore: reference tagged modules and testing relaxing k8s version --- main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index 3b34d19..381f1a4 100644 --- a/main.tf +++ b/main.tf @@ -68,10 +68,10 @@ module "external_infoblox_record" { # Create the cluster module "jhub_cluster" { - source = "git::https://github.com/BrownUniversity/terraform-gcp-cluster.git?ref=patch-add-support-for-csi-driver" + source = "git::https://github.com/BrownUniversity/terraform-gcp-cluster.git?ref= v0.1.5" cluster_name = var.cluster_name project_id = module.jhub_project.project_id - kubernetes_version = "1.24.8-gke.2000" + kubernetes_version = "1.24" regional = var.regional region = var.region node_zones = [var.gcp_zone] From 5b08be3fa0216d782a89ec03e4d75cd76116ac9b Mon Sep 17 00:00:00 2001 From: Maria Isabel Restrepo Date: Wed, 11 Jan 2023 17:23:30 -0500 Subject: [PATCH 7/8] refactor: make k8s version a variable and mandatory --- examples/sample-jhub/main.tf | 1 + main.tf | 2 +- variables.tf | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/sample-jhub/main.tf b/examples/sample-jhub/main.tf index d4e70da..ca38520 100644 --- a/examples/sample-jhub/main.tf +++ b/examples/sample-jhub/main.tf @@ -28,6 +28,7 @@ module "sample-jhub" { record_domain = local.jhub_domain # ---------------- CLUSTER VARIABLES ----------------------- + kubernetes_version = 1.24 regional = false region = local.gcp_region gcp_zone = local.gcp_zone diff --git a/main.tf b/main.tf index 381f1a4..2765c0d 100644 --- a/main.tf +++ b/main.tf @@ -71,7 +71,7 @@ module "jhub_cluster" { source = "git::https://github.com/BrownUniversity/terraform-gcp-cluster.git?ref= v0.1.5" cluster_name = var.cluster_name project_id = module.jhub_project.project_id - kubernetes_version = "1.24" + kubernetes_version = var.kubernetes_version regional = var.regional region = var.region node_zones = [var.gcp_zone] diff --git a/variables.tf b/variables.tf index 67a8221..13a6888 100644 --- a/variables.tf +++ b/variables.tf @@ -391,6 +391,11 @@ variable "helm_values_file" { description = "Relative path and file name. Example: values.yaml" } +variable "kubernetes_version" { + type = string + description = "The Kubernetes version of the masters. If set to 'latest' it will pull latest available version in the selected region." +} + variable "jhub_helm_version" { type = string description = "Version of the JupyterHub Helm Chart Release" From 76e0761f7993cc6326ff0d4dfd6e85df9a9c6ae6 Mon Sep 17 00:00:00 2001 From: Maria Isabel Restrepo Date: Wed, 11 Jan 2023 17:25:45 -0500 Subject: [PATCH 8/8] fix: typo empty space in cluster modue version --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 2765c0d..b187645 100644 --- a/main.tf +++ b/main.tf @@ -68,7 +68,7 @@ module "external_infoblox_record" { # Create the cluster module "jhub_cluster" { - source = "git::https://github.com/BrownUniversity/terraform-gcp-cluster.git?ref= v0.1.5" + source = "git::https://github.com/BrownUniversity/terraform-gcp-cluster.git?ref=v0.1.5" cluster_name = var.cluster_name project_id = module.jhub_project.project_id kubernetes_version = var.kubernetes_version