From 413081b049c2489baa5ebc347dadd4a973217b3e Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Tue, 20 Jul 2021 10:13:11 +0100 Subject: [PATCH 1/2] increase AWS disk size --- .../infrastructure/modules/aws/kubernetes/main.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/qhub/template/{{ cookiecutter.repo_directory }}/infrastructure/modules/aws/kubernetes/main.tf b/qhub/template/{{ cookiecutter.repo_directory }}/infrastructure/modules/aws/kubernetes/main.tf index c6c24d395..b6a9c7c69 100644 --- a/qhub/template/{{ cookiecutter.repo_directory }}/infrastructure/modules/aws/kubernetes/main.tf +++ b/qhub/template/{{ cookiecutter.repo_directory }}/infrastructure/modules/aws/kubernetes/main.tf @@ -25,6 +25,7 @@ resource "aws_eks_node_group" "main" { instance_types = [var.node_groups[count.index].instance_type] ami_type = var.node_groups[count.index].gpu == true ? "AL2_x86_64_GPU" : "AL2_x86_64" + disk_size = 50 scaling_config { min_size = var.node_groups[count.index].min_size From 799fdb24e737f942a93acf58810a06de92d006ca Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Fri, 16 Jul 2021 10:34:15 +0100 Subject: [PATCH 2/2] add volume binding mode for storage class - provision pods before pvc - fix namespace name - wait conda-store-storage until bound add wait for first consumer --- .../infrastructure/kubernetes.tf | 4 ++-- .../infrastructure/modules/kubernetes/nfs-mount/main.tf | 1 - .../modules/kubernetes/services/conda-store/main.tf | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/qhub/template/{{ cookiecutter.repo_directory }}/infrastructure/kubernetes.tf b/qhub/template/{{ cookiecutter.repo_directory }}/infrastructure/kubernetes.tf index ac60ba451..fee0f7289 100644 --- a/qhub/template/{{ cookiecutter.repo_directory }}/infrastructure/kubernetes.tf +++ b/qhub/template/{{ cookiecutter.repo_directory }}/infrastructure/kubernetes.tf @@ -181,8 +181,8 @@ module "qhub" { name = "qhub" namespace = var.environment - home-pvc = module.kubernetes-nfs-mount.persistent_volume_claim.name - conda-store-pvc = module.kubernetes-conda-store-mount.persistent_volume_claim.name + home-pvc = "nfs-mount-${var.environment}-share" + conda-store-pvc = "conda-store-${var.environment}-share" external-url = var.endpoint diff --git a/qhub/template/{{ cookiecutter.repo_directory }}/infrastructure/modules/kubernetes/nfs-mount/main.tf b/qhub/template/{{ cookiecutter.repo_directory }}/infrastructure/modules/kubernetes/nfs-mount/main.tf index dc01dd348..4534be7b2 100644 --- a/qhub/template/{{ cookiecutter.repo_directory }}/infrastructure/modules/kubernetes/nfs-mount/main.tf +++ b/qhub/template/{{ cookiecutter.repo_directory }}/infrastructure/modules/kubernetes/nfs-mount/main.tf @@ -2,7 +2,6 @@ resource "kubernetes_storage_class" "main" { metadata { name = "${var.name}-${var.namespace}-share" } - storage_provisioner = "kubernetes.io/fake-nfs" } diff --git a/qhub/template/{{ cookiecutter.repo_directory }}/infrastructure/modules/kubernetes/services/conda-store/main.tf b/qhub/template/{{ cookiecutter.repo_directory }}/infrastructure/modules/kubernetes/services/conda-store/main.tf index 7134b6ef6..f1d2af255 100644 --- a/qhub/template/{{ cookiecutter.repo_directory }}/infrastructure/modules/kubernetes/services/conda-store/main.tf +++ b/qhub/template/{{ cookiecutter.repo_directory }}/infrastructure/modules/kubernetes/services/conda-store/main.tf @@ -3,7 +3,7 @@ resource "kubernetes_persistent_volume_claim" "main" { name = "${var.name}-conda-store-storage" namespace = var.namespace } - + wait_until_bound = true spec { access_modes = ["ReadWriteOnce"] resources {