From be7a85bfc205b298af1e3692387895a71c8f1d77 Mon Sep 17 00:00:00 2001 From: Sarah Gibson Date: Fri, 15 Nov 2024 16:38:35 +0000 Subject: [PATCH 1/5] strudel: add hub-specific nodegroups --- eksctl/strudel.jsonnet | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/eksctl/strudel.jsonnet b/eksctl/strudel.jsonnet index 8ac5bfc47a..a277f74b9a 100644 --- a/eksctl/strudel.jsonnet +++ b/eksctl/strudel.jsonnet @@ -25,9 +25,42 @@ local nodeAz = "us-west-2a"; // A `node.kubernetes.io/instance-type label is added, so pods // can request a particular kind of node with a nodeSelector local notebookNodes = [ - { instanceType: "r5.xlarge" }, - { instanceType: "r5.4xlarge" }, - { instanceType: "r5.16xlarge" }, + { + instanceType: "r5.xlarge", + namePrefix: "nb-staging", + labels+: { "2i2c/hub-name": "staging" }, + tags+: { "2i2c:hub-name": "staging" }, + }, + { + instanceType: "r5.xlarge", + namePrefix: "nb-prod", + labels+: { "2i2c/hub-name": "prod" }, + tags+: { "2i2c:hub-name": "prod" }, + }, + { + instanceType: "r5.4xlarge", + namePrefix: "nb-staging", + labels+: { "2i2c/hub-name": "staging" }, + tags+: { "2i2c:hub-name": "staging" }, + }, + { + instanceType: "r5.4xlarge", + namePrefix: "nb-prod", + labels+: { "2i2c/hub-name": "prod" }, + tags+: { "2i2c:hub-name": "prod" }, + }, + { + instanceType: "r5.16xlarge", + namePrefix: "nb-staging", + labels+: { "2i2c/hub-name": "staging" }, + tags+: { "2i2c:hub-name": "staging" }, + }, + { + instanceType: "r5.16xlarge", + namePrefix: "nb-prod", + labels+: { "2i2c/hub-name": "prod" }, + tags+: { "2i2c:hub-name": "prod" }, + }, ]; local daskNodes = []; From b949364f7a8a6e6660721a9a66ff5aa9cb9ec229 Mon Sep 17 00:00:00 2001 From: Sarah Gibson Date: Fri, 15 Nov 2024 16:38:53 +0000 Subject: [PATCH 2/5] strudel: add node-purpose tags --- eksctl/strudel.jsonnet | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eksctl/strudel.jsonnet b/eksctl/strudel.jsonnet index a277f74b9a..df0ef2cd7d 100644 --- a/eksctl/strudel.jsonnet +++ b/eksctl/strudel.jsonnet @@ -139,6 +139,7 @@ local daskNodes = []; "hub.jupyter.org/node-purpose": "core", "k8s.dask.org/node-purpose": "core", }, + tags+: { "2i2c:node-purpose": "core" }, }, ] + [ ng + { @@ -154,6 +155,7 @@ local daskNodes = []; "hub.jupyter.org/node-purpose": "user", "k8s.dask.org/node-purpose": "scheduler" }, + tags+: { "2i2c:node-purpose": "user" }, taints+: { "hub.jupyter.org_dedicated": "user:NoSchedule", "hub.jupyter.org/dedicated": "user:NoSchedule", From debe8c1da8f30470e5cd0e6877245a17b682664b Mon Sep 17 00:00:00 2001 From: Sarah Gibson Date: Fri, 15 Nov 2024 16:39:05 +0000 Subject: [PATCH 3/5] strudel: cycle core nodegroup --- eksctl/strudel.jsonnet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eksctl/strudel.jsonnet b/eksctl/strudel.jsonnet index df0ef2cd7d..48494b1046 100644 --- a/eksctl/strudel.jsonnet +++ b/eksctl/strudel.jsonnet @@ -126,7 +126,7 @@ local daskNodes = []; [ ng + { namePrefix: 'core', - nameSuffix: 'a', + nameSuffix: 'b', nameIncludeInstanceType: false, availabilityZones: [nodeAz], ssh: { From bdb4941ca0b40e1b0105cf0f2e2ff0547a48ec5d Mon Sep 17 00:00:00 2001 From: Sarah Gibson Date: Fri, 15 Nov 2024 16:40:36 +0000 Subject: [PATCH 4/5] strudel: add node selectors --- config/clusters/strudel/prod.values.yaml | 3 +++ config/clusters/strudel/staging.values.yaml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/config/clusters/strudel/prod.values.yaml b/config/clusters/strudel/prod.values.yaml index 8318d2bf3e..15104e063c 100644 --- a/config/clusters/strudel/prod.values.yaml +++ b/config/clusters/strudel/prod.values.yaml @@ -12,3 +12,6 @@ jupyterhub: - strudel-science scope: - read:org + singleuser: + nodeSelector: + 2i2c/hub-name: prod diff --git a/config/clusters/strudel/staging.values.yaml b/config/clusters/strudel/staging.values.yaml index 39471a9e1d..cd92201584 100644 --- a/config/clusters/strudel/staging.values.yaml +++ b/config/clusters/strudel/staging.values.yaml @@ -12,3 +12,6 @@ jupyterhub: - strudel-science scope: - read:org + singleuser: + nodeSelector: + 2i2c/hub-name: staging \ No newline at end of file From 0c457dba3e27539d7178a705b38ae8ca009affaf Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2024 16:42:15 +0000 Subject: [PATCH 5/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- config/clusters/strudel/staging.values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/clusters/strudel/staging.values.yaml b/config/clusters/strudel/staging.values.yaml index cd92201584..4c01729978 100644 --- a/config/clusters/strudel/staging.values.yaml +++ b/config/clusters/strudel/staging.values.yaml @@ -14,4 +14,4 @@ jupyterhub: - read:org singleuser: nodeSelector: - 2i2c/hub-name: staging \ No newline at end of file + 2i2c/hub-name: staging