From a89b0aec17297c12eb48ef97ec7044d5b3d34508 Mon Sep 17 00:00:00 2001 From: Chuck McAndrew <6248903+dcmcand@users.noreply.github.com> Date: Wed, 8 Jan 2025 11:06:57 +0100 Subject: [PATCH 1/4] update to latest k8s version, set max k8s version to only major and minor versions, and upgrade k8s and helm terraform providers --- src/_nebari/constants.py | 2 +- src/_nebari/provider/cloud/commons.py | 4 +--- src/_nebari/stages/kubernetes_ingress/template/versions.tf | 4 ++-- src/_nebari/stages/kubernetes_initialize/template/versions.tf | 4 ++-- src/_nebari/stages/kubernetes_keycloak/template/versions.tf | 4 ++-- .../kubernetes_keycloak_configuration/template/versions.tf | 4 ++-- .../modules/kubernetes/services/argo-workflows/versions.tf | 4 ++-- .../modules/kubernetes/services/monitoring/versions.tf | 4 ++-- .../modules/kubernetes/services/rook-ceph/versions.tf | 4 ++-- src/_nebari/stages/kubernetes_services/template/versions.tf | 4 ++-- src/_nebari/stages/nebari_tf_extensions/template/versions.tf | 4 ++-- 11 files changed, 20 insertions(+), 22 deletions(-) diff --git a/src/_nebari/constants.py b/src/_nebari/constants.py index 725a1d91b4..dfff4f696f 100644 --- a/src/_nebari/constants.py +++ b/src/_nebari/constants.py @@ -9,7 +9,7 @@ # 04-kubernetes-ingress DEFAULT_TRAEFIK_IMAGE_TAG = "2.9.1" -HIGHEST_SUPPORTED_K8S_VERSION = ("1", "29", "2") +HIGHEST_SUPPORTED_K8S_VERSION = ("1", "32") # specify Major and Minor version DEFAULT_GKE_RELEASE_CHANNEL = "UNSPECIFIED" DEFAULT_NEBARI_DASK_VERSION = CURRENT_RELEASE diff --git a/src/_nebari/provider/cloud/commons.py b/src/_nebari/provider/cloud/commons.py index 566b2029a4..d2bed87c48 100644 --- a/src/_nebari/provider/cloud/commons.py +++ b/src/_nebari/provider/cloud/commons.py @@ -6,9 +6,7 @@ def filter_by_highest_supported_k8s_version(k8s_versions_list): filtered_k8s_versions_list = [] for k8s_version in k8s_versions_list: - version = tuple( - filter(None, re.search(r"(\d+)\.(\d+)(?:\.(\d+))?", k8s_version).groups()) - ) + version = tuple(filter(None, re.search(r"(\d+)\.(\d+)", k8s_version).groups())) if version <= HIGHEST_SUPPORTED_K8S_VERSION: filtered_k8s_versions_list.append(k8s_version) return filtered_k8s_versions_list diff --git a/src/_nebari/stages/kubernetes_ingress/template/versions.tf b/src/_nebari/stages/kubernetes_ingress/template/versions.tf index 341def1365..791f4112c8 100644 --- a/src/_nebari/stages/kubernetes_ingress/template/versions.tf +++ b/src/_nebari/stages/kubernetes_ingress/template/versions.tf @@ -2,11 +2,11 @@ terraform { required_providers { helm = { source = "hashicorp/helm" - version = "2.1.2" + version = "2.17.0" } kubernetes = { source = "hashicorp/kubernetes" - version = "2.20.0" + version = "2.35.1" } } required_version = ">= 1.0" diff --git a/src/_nebari/stages/kubernetes_initialize/template/versions.tf b/src/_nebari/stages/kubernetes_initialize/template/versions.tf index 341def1365..791f4112c8 100644 --- a/src/_nebari/stages/kubernetes_initialize/template/versions.tf +++ b/src/_nebari/stages/kubernetes_initialize/template/versions.tf @@ -2,11 +2,11 @@ terraform { required_providers { helm = { source = "hashicorp/helm" - version = "2.1.2" + version = "2.17.0" } kubernetes = { source = "hashicorp/kubernetes" - version = "2.20.0" + version = "2.35.1" } } required_version = ">= 1.0" diff --git a/src/_nebari/stages/kubernetes_keycloak/template/versions.tf b/src/_nebari/stages/kubernetes_keycloak/template/versions.tf index 341def1365..791f4112c8 100644 --- a/src/_nebari/stages/kubernetes_keycloak/template/versions.tf +++ b/src/_nebari/stages/kubernetes_keycloak/template/versions.tf @@ -2,11 +2,11 @@ terraform { required_providers { helm = { source = "hashicorp/helm" - version = "2.1.2" + version = "2.17.0" } kubernetes = { source = "hashicorp/kubernetes" - version = "2.20.0" + version = "2.35.1" } } required_version = ">= 1.0" diff --git a/src/_nebari/stages/kubernetes_keycloak_configuration/template/versions.tf b/src/_nebari/stages/kubernetes_keycloak_configuration/template/versions.tf index 00353a6d2f..298f5f5ca1 100644 --- a/src/_nebari/stages/kubernetes_keycloak_configuration/template/versions.tf +++ b/src/_nebari/stages/kubernetes_keycloak_configuration/template/versions.tf @@ -2,11 +2,11 @@ terraform { required_providers { helm = { source = "hashicorp/helm" - version = "2.1.2" + version = "2.17.0" } kubernetes = { source = "hashicorp/kubernetes" - version = "2.20.0" + version = "2.35.1" } keycloak = { source = "mrparkers/keycloak" diff --git a/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/argo-workflows/versions.tf b/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/argo-workflows/versions.tf index 341def1365..791f4112c8 100644 --- a/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/argo-workflows/versions.tf +++ b/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/argo-workflows/versions.tf @@ -2,11 +2,11 @@ terraform { required_providers { helm = { source = "hashicorp/helm" - version = "2.1.2" + version = "2.17.0" } kubernetes = { source = "hashicorp/kubernetes" - version = "2.20.0" + version = "2.35.1" } } required_version = ">= 1.0" diff --git a/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/monitoring/versions.tf b/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/monitoring/versions.tf index 341def1365..791f4112c8 100644 --- a/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/monitoring/versions.tf +++ b/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/monitoring/versions.tf @@ -2,11 +2,11 @@ terraform { required_providers { helm = { source = "hashicorp/helm" - version = "2.1.2" + version = "2.17.0" } kubernetes = { source = "hashicorp/kubernetes" - version = "2.20.0" + version = "2.35.1" } } required_version = ">= 1.0" diff --git a/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/rook-ceph/versions.tf b/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/rook-ceph/versions.tf index 341def1365..791f4112c8 100644 --- a/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/rook-ceph/versions.tf +++ b/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/rook-ceph/versions.tf @@ -2,11 +2,11 @@ terraform { required_providers { helm = { source = "hashicorp/helm" - version = "2.1.2" + version = "2.17.0" } kubernetes = { source = "hashicorp/kubernetes" - version = "2.20.0" + version = "2.35.1" } } required_version = ">= 1.0" diff --git a/src/_nebari/stages/kubernetes_services/template/versions.tf b/src/_nebari/stages/kubernetes_services/template/versions.tf index 00353a6d2f..298f5f5ca1 100644 --- a/src/_nebari/stages/kubernetes_services/template/versions.tf +++ b/src/_nebari/stages/kubernetes_services/template/versions.tf @@ -2,11 +2,11 @@ terraform { required_providers { helm = { source = "hashicorp/helm" - version = "2.1.2" + version = "2.17.0" } kubernetes = { source = "hashicorp/kubernetes" - version = "2.20.0" + version = "2.35.1" } keycloak = { source = "mrparkers/keycloak" diff --git a/src/_nebari/stages/nebari_tf_extensions/template/versions.tf b/src/_nebari/stages/nebari_tf_extensions/template/versions.tf index 00353a6d2f..298f5f5ca1 100644 --- a/src/_nebari/stages/nebari_tf_extensions/template/versions.tf +++ b/src/_nebari/stages/nebari_tf_extensions/template/versions.tf @@ -2,11 +2,11 @@ terraform { required_providers { helm = { source = "hashicorp/helm" - version = "2.1.2" + version = "2.17.0" } kubernetes = { source = "hashicorp/kubernetes" - version = "2.20.0" + version = "2.35.1" } keycloak = { source = "mrparkers/keycloak" From c7ab98a5dece36cc5011bcbcf95c148de2dc3839 Mon Sep 17 00:00:00 2001 From: Chuck McAndrew <6248903+dcmcand@users.noreply.github.com> Date: Thu, 9 Jan 2025 18:24:53 +0100 Subject: [PATCH 2/4] roll back helm chart provider upgrade --- src/_nebari/stages/kubernetes_ingress/template/versions.tf | 2 +- src/_nebari/stages/kubernetes_initialize/template/versions.tf | 2 +- src/_nebari/stages/kubernetes_keycloak/template/versions.tf | 2 +- .../kubernetes_keycloak_configuration/template/versions.tf | 2 +- .../modules/kubernetes/services/argo-workflows/versions.tf | 2 +- .../template/modules/kubernetes/services/monitoring/versions.tf | 2 +- .../template/modules/kubernetes/services/rook-ceph/versions.tf | 2 +- src/_nebari/stages/kubernetes_services/template/versions.tf | 2 +- src/_nebari/stages/nebari_tf_extensions/template/versions.tf | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/_nebari/stages/kubernetes_ingress/template/versions.tf b/src/_nebari/stages/kubernetes_ingress/template/versions.tf index 791f4112c8..d1e5f8acfb 100644 --- a/src/_nebari/stages/kubernetes_ingress/template/versions.tf +++ b/src/_nebari/stages/kubernetes_ingress/template/versions.tf @@ -2,7 +2,7 @@ terraform { required_providers { helm = { source = "hashicorp/helm" - version = "2.17.0" + version = "2.1.2" } kubernetes = { source = "hashicorp/kubernetes" diff --git a/src/_nebari/stages/kubernetes_initialize/template/versions.tf b/src/_nebari/stages/kubernetes_initialize/template/versions.tf index 791f4112c8..d1e5f8acfb 100644 --- a/src/_nebari/stages/kubernetes_initialize/template/versions.tf +++ b/src/_nebari/stages/kubernetes_initialize/template/versions.tf @@ -2,7 +2,7 @@ terraform { required_providers { helm = { source = "hashicorp/helm" - version = "2.17.0" + version = "2.1.2" } kubernetes = { source = "hashicorp/kubernetes" diff --git a/src/_nebari/stages/kubernetes_keycloak/template/versions.tf b/src/_nebari/stages/kubernetes_keycloak/template/versions.tf index 791f4112c8..d1e5f8acfb 100644 --- a/src/_nebari/stages/kubernetes_keycloak/template/versions.tf +++ b/src/_nebari/stages/kubernetes_keycloak/template/versions.tf @@ -2,7 +2,7 @@ terraform { required_providers { helm = { source = "hashicorp/helm" - version = "2.17.0" + version = "2.1.2" } kubernetes = { source = "hashicorp/kubernetes" diff --git a/src/_nebari/stages/kubernetes_keycloak_configuration/template/versions.tf b/src/_nebari/stages/kubernetes_keycloak_configuration/template/versions.tf index 298f5f5ca1..d3f87478e2 100644 --- a/src/_nebari/stages/kubernetes_keycloak_configuration/template/versions.tf +++ b/src/_nebari/stages/kubernetes_keycloak_configuration/template/versions.tf @@ -2,7 +2,7 @@ terraform { required_providers { helm = { source = "hashicorp/helm" - version = "2.17.0" + version = "2.1.2" } kubernetes = { source = "hashicorp/kubernetes" diff --git a/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/argo-workflows/versions.tf b/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/argo-workflows/versions.tf index 791f4112c8..d1e5f8acfb 100644 --- a/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/argo-workflows/versions.tf +++ b/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/argo-workflows/versions.tf @@ -2,7 +2,7 @@ terraform { required_providers { helm = { source = "hashicorp/helm" - version = "2.17.0" + version = "2.1.2" } kubernetes = { source = "hashicorp/kubernetes" diff --git a/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/monitoring/versions.tf b/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/monitoring/versions.tf index 791f4112c8..d1e5f8acfb 100644 --- a/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/monitoring/versions.tf +++ b/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/monitoring/versions.tf @@ -2,7 +2,7 @@ terraform { required_providers { helm = { source = "hashicorp/helm" - version = "2.17.0" + version = "2.1.2" } kubernetes = { source = "hashicorp/kubernetes" diff --git a/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/rook-ceph/versions.tf b/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/rook-ceph/versions.tf index 791f4112c8..d1e5f8acfb 100644 --- a/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/rook-ceph/versions.tf +++ b/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/rook-ceph/versions.tf @@ -2,7 +2,7 @@ terraform { required_providers { helm = { source = "hashicorp/helm" - version = "2.17.0" + version = "2.1.2" } kubernetes = { source = "hashicorp/kubernetes" diff --git a/src/_nebari/stages/kubernetes_services/template/versions.tf b/src/_nebari/stages/kubernetes_services/template/versions.tf index 298f5f5ca1..d3f87478e2 100644 --- a/src/_nebari/stages/kubernetes_services/template/versions.tf +++ b/src/_nebari/stages/kubernetes_services/template/versions.tf @@ -2,7 +2,7 @@ terraform { required_providers { helm = { source = "hashicorp/helm" - version = "2.17.0" + version = "2.1.2" } kubernetes = { source = "hashicorp/kubernetes" diff --git a/src/_nebari/stages/nebari_tf_extensions/template/versions.tf b/src/_nebari/stages/nebari_tf_extensions/template/versions.tf index 298f5f5ca1..d3f87478e2 100644 --- a/src/_nebari/stages/nebari_tf_extensions/template/versions.tf +++ b/src/_nebari/stages/nebari_tf_extensions/template/versions.tf @@ -2,7 +2,7 @@ terraform { required_providers { helm = { source = "hashicorp/helm" - version = "2.17.0" + version = "2.1.2" } kubernetes = { source = "hashicorp/kubernetes" From e840d75787cb1305863ab75689d0e480cfbf9f4e Mon Sep 17 00:00:00 2001 From: Chuck McAndrew <6248903+dcmcand@users.noreply.github.com> Date: Thu, 9 Jan 2025 18:56:12 +0100 Subject: [PATCH 3/4] set max version to 1.31 --- src/_nebari/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_nebari/constants.py b/src/_nebari/constants.py index dfff4f696f..351ac3615e 100644 --- a/src/_nebari/constants.py +++ b/src/_nebari/constants.py @@ -9,7 +9,7 @@ # 04-kubernetes-ingress DEFAULT_TRAEFIK_IMAGE_TAG = "2.9.1" -HIGHEST_SUPPORTED_K8S_VERSION = ("1", "32") # specify Major and Minor version +HIGHEST_SUPPORTED_K8S_VERSION = ("1", "31") # specify Major and Minor version DEFAULT_GKE_RELEASE_CHANNEL = "UNSPECIFIED" DEFAULT_NEBARI_DASK_VERSION = CURRENT_RELEASE From e970217327c2908b30bd93519a9317a4df1cb28d Mon Sep 17 00:00:00 2001 From: Chuck McAndrew <6248903+dcmcand@users.noreply.github.com> Date: Thu, 16 Jan 2025 15:09:59 +0100 Subject: [PATCH 4/4] make gp2 storage class default --- .../infrastructure/template/aws/modules/kubernetes/main.tf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/_nebari/stages/infrastructure/template/aws/modules/kubernetes/main.tf b/src/_nebari/stages/infrastructure/template/aws/modules/kubernetes/main.tf index 1f3e688e68..2537b12dad 100644 --- a/src/_nebari/stages/infrastructure/template/aws/modules/kubernetes/main.tf +++ b/src/_nebari/stages/infrastructure/template/aws/modules/kubernetes/main.tf @@ -147,6 +147,9 @@ resource "aws_eks_addon" "aws-ebs-csi-driver" { "eks.amazonaws.com/nodegroup" = "general" } } + defaultStorageClass = { + enabled = true + } }) # Ensure cluster and node groups are created