From 2cc4a595c920406c2605918e6371d97818fdf344 Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Wed, 10 Feb 2021 04:44:36 +0530 Subject: [PATCH] Mark most proxy-public services as ClusterIP We wanna release our unused static IP addresses, since all traffic into most hubs now comes in via the ingress controller. The exceptions are the data8x hubs, cs194 prod and the datahubs. We explicitly mark those as LoadBalancer to keep their public IPs intact. I've already removed their DNS entries. You can't actually just change the type from LoadBalancer to ClusterIP (https://github.com/kubernetes/kubectl/issues/221), so this command was used to patch them manually k get ns | rg staging | rg -v datahub | awk '{ print $1; }' | xargs -L1 -I{} kubectl -n {} patch svc proxy-public --type='json' -p '[{"op":"replace","path":"/spec/type","value":"ClusterIP"},{"op":"replace","path":"/spec/ports/0/nodePort","value":null},{"op":"replace","path":"/spec/ports/1/nodePort","value":null},{"op":"replace","path":"/spec/ports/2/nodePort","value":null}]' Ref #2167 --- deployments/cs194/config/prod.yaml | 1 + deployments/data8x/config/common.yaml | 2 ++ deployments/datahub/config/common.yaml | 1 + hub/values.yaml | 1 + 4 files changed, 5 insertions(+) diff --git a/deployments/cs194/config/prod.yaml b/deployments/cs194/config/prod.yaml index 1506fc2c..0b8d2999 100644 --- a/deployments/cs194/config/prod.yaml +++ b/deployments/cs194/config/prod.yaml @@ -3,6 +3,7 @@ jupyterhub-ssh: jupyterhub: proxy: + type: Loadbalancer service: loadBalancerIP: 35.193.57.206 https: diff --git a/deployments/data8x/config/common.yaml b/deployments/data8x/config/common.yaml index f8c28af8..62e6d9b5 100644 --- a/deployments/data8x/config/common.yaml +++ b/deployments/data8x/config/common.yaml @@ -9,6 +9,8 @@ jupyterhub: services: gofer_nb: url: http://35.239.20.122:10101 + proxy: + type: Loadbalancer auth: type: lti admin: diff --git a/deployments/datahub/config/common.yaml b/deployments/datahub/config/common.yaml index a73b3700..532a89c4 100644 --- a/deployments/datahub/config/common.yaml +++ b/deployments/datahub/config/common.yaml @@ -68,6 +68,7 @@ jupyterhub: mem_limit: 4096M mem_guarantee: 1024M proxy: + type: Loadbalancer nodeSelector: hub.jupyter.org/pool-name: core-pool auth: diff --git a/hub/values.yaml b/hub/values.yaml index 8ac3279b..44d277fd 100644 --- a/hub/values.yaml +++ b/hub/values.yaml @@ -93,6 +93,7 @@ jupyterhub: memory: 1G proxy: service: + type: ClusterIP extraPorts: - port: 22 targetPort: 8022