From 3defcac98e3d2ee5bfd1f0a2a7a143508177bf83 Mon Sep 17 00:00:00 2001 From: Birol Bilgin Date: Wed, 24 May 2023 06:42:17 +0200 Subject: [PATCH] ci: fix gke network starvation With current defaults, the number of clusters that can be provisioned simultaneously in the same project is around 31. This commit changes default subnet range to /26, pod ip range to /21 and service ip range to /24. After these changes max clusters that can be provisioned will be more then 3500. Signed-off-by: Birol Bilgin --- .github/workflows/externalworkloads.yaml | 3 +++ .github/workflows/gke.yaml | 4 +++- .github/workflows/multicluster.yaml | 8 ++++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/externalworkloads.yaml b/.github/workflows/externalworkloads.yaml index 62a1a6b403..d6bc3a7382 100644 --- a/.github/workflows/externalworkloads.yaml +++ b/.github/workflows/externalworkloads.yaml @@ -120,6 +120,9 @@ jobs: gcloud container clusters create ${{ env.clusterName }} \ --labels "usage=${{ github.repository_owner }}-${{ github.event.repository.name }},owner=${{ steps.vars.outputs.owner }}" \ --zone ${{ env.zone }} \ + --enable-ip-alias \ + --cluster-ipv4-cidr="/21" \ + --services-ipv4-cidr="/24" \ --image-type COS_CONTAINERD \ --num-nodes 2 \ --machine-type e2-custom-2-4096 \ diff --git a/.github/workflows/gke.yaml b/.github/workflows/gke.yaml index 0081e2ad79..a68b0591d8 100644 --- a/.github/workflows/gke.yaml +++ b/.github/workflows/gke.yaml @@ -100,7 +100,9 @@ jobs: --labels "usage=${{ github.repository_owner }}-${{ github.event.repository.name }},owner=${{ steps.vars.outputs.owner }}" \ --zone ${{ env.zone }} \ --enable-ip-alias \ - --create-subnetwork="" \ + --create-subnetwork="range=/26" \ + --cluster-ipv4-cidr="/21" \ + --services-ipv4-cidr="/24" \ --image-type COS_CONTAINERD \ --num-nodes 2 \ --machine-type e2-custom-2-4096 \ diff --git a/.github/workflows/multicluster.yaml b/.github/workflows/multicluster.yaml index 0c39be0921..9c3b2e7962 100644 --- a/.github/workflows/multicluster.yaml +++ b/.github/workflows/multicluster.yaml @@ -110,7 +110,9 @@ jobs: --labels "usage=${{ github.repository_owner }}-${{ github.event.repository.name }},owner=${{ steps.vars.outputs.owner }}" \ --zone ${{ env.zone }} \ --enable-ip-alias \ - --create-subnetwork="" \ + --create-subnetwork="range=/26" \ + --cluster-ipv4-cidr="/21" \ + --services-ipv4-cidr="/24" \ --image-type COS_CONTAINERD \ --num-nodes 2 \ --machine-type e2-custom-2-4096 \ @@ -134,7 +136,9 @@ jobs: --labels "usage=${{ github.repository_owner }}-${{ github.event.repository.name }},owner=${{ steps.vars.outputs.owner }}" \ --zone ${{ env.zone }} \ --enable-ip-alias \ - --create-subnetwork="" \ + --create-subnetwork="range=/26" \ + --cluster-ipv4-cidr="/21" \ + --services-ipv4-cidr="/24" \ --image-type COS_CONTAINERD \ --num-nodes 2 \ --machine-type e2-custom-2-4096 \