From f771aaccf2b1ed77a9ff85eced3d11c1dc37a4c4 Mon Sep 17 00:00:00 2001 From: z1cheng Date: Sun, 25 Jun 2023 14:57:37 +0000 Subject: [PATCH 1/5] Add rollingUpdate strategy to each static deployment file Signed-off-by: z1cheng --- deploy/static/provider/aws/deploy.yaml | 4 ++++ .../static/provider/aws/nlb-with-tls-termination/deploy.yaml | 4 ++++ deploy/static/provider/baremetal/deploy.yaml | 4 ++++ deploy/static/provider/cloud/deploy.yaml | 4 ++++ deploy/static/provider/do/deploy.yaml | 4 ++++ deploy/static/provider/exoscale/deploy.yaml | 4 ++++ deploy/static/provider/oci/deploy.yaml | 4 ++++ deploy/static/provider/scw/deploy.yaml | 4 ++++ 8 files changed, 32 insertions(+) diff --git a/deploy/static/provider/aws/deploy.yaml b/deploy/static/provider/aws/deploy.yaml index 48f7f11b10..481b1ba738 100644 --- a/deploy/static/provider/aws/deploy.yaml +++ b/deploy/static/provider/aws/deploy.yaml @@ -411,6 +411,10 @@ spec: app.kubernetes.io/component: controller app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx + strategy: + rollingUpdate: + maxUnavailable: 1 + type: RollingUpdate template: metadata: labels: diff --git a/deploy/static/provider/aws/nlb-with-tls-termination/deploy.yaml b/deploy/static/provider/aws/nlb-with-tls-termination/deploy.yaml index b4e2cd5f66..233d40f0c4 100644 --- a/deploy/static/provider/aws/nlb-with-tls-termination/deploy.yaml +++ b/deploy/static/provider/aws/nlb-with-tls-termination/deploy.yaml @@ -420,6 +420,10 @@ spec: app.kubernetes.io/component: controller app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx + strategy: + rollingUpdate: + maxUnavailable: 1 + type: RollingUpdate template: metadata: labels: diff --git a/deploy/static/provider/baremetal/deploy.yaml b/deploy/static/provider/baremetal/deploy.yaml index 74292b82b8..98f36320cb 100644 --- a/deploy/static/provider/baremetal/deploy.yaml +++ b/deploy/static/provider/baremetal/deploy.yaml @@ -406,6 +406,10 @@ spec: app.kubernetes.io/component: controller app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx + strategy: + rollingUpdate: + maxUnavailable: 1 + type: RollingUpdate template: metadata: labels: diff --git a/deploy/static/provider/cloud/deploy.yaml b/deploy/static/provider/cloud/deploy.yaml index 6dac638654..e95b8b1893 100644 --- a/deploy/static/provider/cloud/deploy.yaml +++ b/deploy/static/provider/cloud/deploy.yaml @@ -407,6 +407,10 @@ spec: app.kubernetes.io/component: controller app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx + strategy: + rollingUpdate: + maxUnavailable: 1 + type: RollingUpdate template: metadata: labels: diff --git a/deploy/static/provider/do/deploy.yaml b/deploy/static/provider/do/deploy.yaml index 0e3f4b46f5..5af2c08ceb 100644 --- a/deploy/static/provider/do/deploy.yaml +++ b/deploy/static/provider/do/deploy.yaml @@ -410,6 +410,10 @@ spec: app.kubernetes.io/component: controller app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx + strategy: + rollingUpdate: + maxUnavailable: 1 + type: RollingUpdate template: metadata: labels: diff --git a/deploy/static/provider/exoscale/deploy.yaml b/deploy/static/provider/exoscale/deploy.yaml index a1bd4ed009..042d766465 100644 --- a/deploy/static/provider/exoscale/deploy.yaml +++ b/deploy/static/provider/exoscale/deploy.yaml @@ -416,6 +416,10 @@ spec: app.kubernetes.io/component: controller app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx + strategy: + rollingUpdate: + maxUnavailable: 1 + type: RollingUpdate template: metadata: labels: diff --git a/deploy/static/provider/oci/deploy.yaml b/deploy/static/provider/oci/deploy.yaml index 77de50247f..a8a8efdd2c 100644 --- a/deploy/static/provider/oci/deploy.yaml +++ b/deploy/static/provider/oci/deploy.yaml @@ -410,6 +410,10 @@ spec: app.kubernetes.io/component: controller app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx + strategy: + rollingUpdate: + maxUnavailable: 1 + type: RollingUpdate template: metadata: labels: diff --git a/deploy/static/provider/scw/deploy.yaml b/deploy/static/provider/scw/deploy.yaml index e303a52f5f..9a20e8d8b0 100644 --- a/deploy/static/provider/scw/deploy.yaml +++ b/deploy/static/provider/scw/deploy.yaml @@ -410,6 +410,10 @@ spec: app.kubernetes.io/component: controller app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx + strategy: + rollingUpdate: + maxUnavailable: 1 + type: RollingUpdate template: metadata: labels: From 112a8dae85eb2bae67e6d4ead144b1518c448d48 Mon Sep 17 00:00:00 2001 From: z1cheng Date: Tue, 27 Jun 2023 15:03:36 +0000 Subject: [PATCH 2/5] Update the templates and regenerate Signed-off-by: z1cheng --- deploy/static/provider/exoscale/deploy.yaml | 8 ++++---- .../provider/aws/nlb-with-tls-termination/values.yaml | 4 ++++ hack/manifest-templates/provider/aws/values.yaml | 4 ++++ hack/manifest-templates/provider/baremetal/values.yaml | 4 ++++ hack/manifest-templates/provider/cloud/values.yaml | 4 ++++ hack/manifest-templates/provider/do/values.yaml | 4 ++++ hack/manifest-templates/provider/scw/values.yaml | 4 ++++ 7 files changed, 28 insertions(+), 4 deletions(-) diff --git a/deploy/static/provider/exoscale/deploy.yaml b/deploy/static/provider/exoscale/deploy.yaml index 042d766465..48bb5a04cf 100644 --- a/deploy/static/provider/exoscale/deploy.yaml +++ b/deploy/static/provider/exoscale/deploy.yaml @@ -416,10 +416,6 @@ spec: app.kubernetes.io/component: controller app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/name: ingress-nginx - strategy: - rollingUpdate: - maxUnavailable: 1 - type: RollingUpdate template: metadata: labels: @@ -514,6 +510,10 @@ spec: - name: webhook-cert secret: secretName: ingress-nginx-admission + updateStrategy: + rollingUpdate: + maxUnavailable: 1 + type: RollingUpdate --- apiVersion: batch/v1 kind: Job diff --git a/hack/manifest-templates/provider/aws/nlb-with-tls-termination/values.yaml b/hack/manifest-templates/provider/aws/nlb-with-tls-termination/values.yaml index 5b36b3dd29..46f8417c72 100644 --- a/hack/manifest-templates/provider/aws/nlb-with-tls-termination/values.yaml +++ b/hack/manifest-templates/provider/aws/nlb-with-tls-termination/values.yaml @@ -1,5 +1,9 @@ # AWS NLB with TLS termination controller: + updateStrategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 1 service: type: LoadBalancer externalTrafficPolicy: Local diff --git a/hack/manifest-templates/provider/aws/values.yaml b/hack/manifest-templates/provider/aws/values.yaml index 743721fc4e..37eac03c22 100644 --- a/hack/manifest-templates/provider/aws/values.yaml +++ b/hack/manifest-templates/provider/aws/values.yaml @@ -1,5 +1,9 @@ # AWS - NLB controller: + updateStrategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 1 service: type: LoadBalancer externalTrafficPolicy: Local diff --git a/hack/manifest-templates/provider/baremetal/values.yaml b/hack/manifest-templates/provider/baremetal/values.yaml index 3c5a0840b1..205a7430c5 100644 --- a/hack/manifest-templates/provider/baremetal/values.yaml +++ b/hack/manifest-templates/provider/baremetal/values.yaml @@ -1,5 +1,9 @@ # Baremetal controller: + updateStrategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 1 service: type: NodePort diff --git a/hack/manifest-templates/provider/cloud/values.yaml b/hack/manifest-templates/provider/cloud/values.yaml index 7d8266c0f7..edc5662dd2 100644 --- a/hack/manifest-templates/provider/cloud/values.yaml +++ b/hack/manifest-templates/provider/cloud/values.yaml @@ -1,4 +1,8 @@ controller: + updateStrategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 1 service: type: LoadBalancer externalTrafficPolicy: Local diff --git a/hack/manifest-templates/provider/do/values.yaml b/hack/manifest-templates/provider/do/values.yaml index 2b05784149..aeee47ad67 100644 --- a/hack/manifest-templates/provider/do/values.yaml +++ b/hack/manifest-templates/provider/do/values.yaml @@ -1,5 +1,9 @@ # Digital Ocean controller: + updateStrategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 1 service: type: LoadBalancer externalTrafficPolicy: Local diff --git a/hack/manifest-templates/provider/scw/values.yaml b/hack/manifest-templates/provider/scw/values.yaml index cee5e2b1ee..56d351dcdc 100644 --- a/hack/manifest-templates/provider/scw/values.yaml +++ b/hack/manifest-templates/provider/scw/values.yaml @@ -1,5 +1,9 @@ # Scaleway controller: + updateStrategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 1 service: type: LoadBalancer externalTrafficPolicy: Local From 2fd76a82e194671bcdf8c2a8c8da69969e02c455 Mon Sep 17 00:00:00 2001 From: z1cheng Date: Wed, 28 Jun 2023 14:21:38 +0000 Subject: [PATCH 3/5] Upgrade k8s version and add rolling update for exoscale Signed-off-by: z1cheng --- hack/generate-deploy-scripts.sh | 2 +- hack/manifest-templates/provider/exoscale/values.yaml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hack/generate-deploy-scripts.sh b/hack/generate-deploy-scripts.sh index 6e22b8d882..9041757b5a 100755 --- a/hack/generate-deploy-scripts.sh +++ b/hack/generate-deploy-scripts.sh @@ -22,7 +22,7 @@ fi set -o nounset set -o pipefail -K8S_VERSION="1.22" +K8S_VERSION="1.26" DIR=$(cd $(dirname "${BASH_SOURCE}")/.. && pwd -P) diff --git a/hack/manifest-templates/provider/exoscale/values.yaml b/hack/manifest-templates/provider/exoscale/values.yaml index 17458cac98..867ecc57e0 100644 --- a/hack/manifest-templates/provider/exoscale/values.yaml +++ b/hack/manifest-templates/provider/exoscale/values.yaml @@ -1,6 +1,10 @@ # Exoscale controller: kind: DaemonSet + updateStrategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 1 service: type: LoadBalancer externalTrafficPolicy: Local From 59cd323f1576f80f4934f36e14c2f7b5aabab7f5 Mon Sep 17 00:00:00 2001 From: z1cheng Date: Sat, 1 Jul 2023 03:24:40 +0000 Subject: [PATCH 4/5] Add rolling update strategy to Oracle template Signed-off-by: z1cheng --- hack/manifest-templates/provider/oracle/values.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hack/manifest-templates/provider/oracle/values.yaml b/hack/manifest-templates/provider/oracle/values.yaml index b4480531fd..600dbfe5c8 100644 --- a/hack/manifest-templates/provider/oracle/values.yaml +++ b/hack/manifest-templates/provider/oracle/values.yaml @@ -1,4 +1,8 @@ controller: + updateStrategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 1 service: type: LoadBalancer externalTrafficPolicy: Local From c797da3a14959b15530240add2bfbb304a2bf7ec Mon Sep 17 00:00:00 2001 From: z1cheng Date: Tue, 4 Jul 2023 12:29:25 +0000 Subject: [PATCH 5/5] Revert the k8s version in generate-deploy-scripts.sh Signed-off-by: z1cheng --- hack/generate-deploy-scripts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/generate-deploy-scripts.sh b/hack/generate-deploy-scripts.sh index 9041757b5a..6e22b8d882 100755 --- a/hack/generate-deploy-scripts.sh +++ b/hack/generate-deploy-scripts.sh @@ -22,7 +22,7 @@ fi set -o nounset set -o pipefail -K8S_VERSION="1.26" +K8S_VERSION="1.22" DIR=$(cd $(dirname "${BASH_SOURCE}")/.. && pwd -P)