harvester / harvester

Open source hyperconverged infrastructure (HCI) software
https://harvesterhci.io/
Apache License 2.0
3.75k stars 314 forks source link

[ENHANCEMENT] Harvester-webhook uses same rollingUpdate strategy as harvester #6486

Open w13915984028 opened 1 week ago

w13915984028 commented 1 week ago

Is your enhancement related to a problem? Please describe.

Harvester deployment has following upgrade strategy

https://github.com/harvester/harvester/blob/d794ee0894eec1ff99c8d593cb619ec550a4c3a6/deploy/charts/harvester/values.yaml#L144

strategy:
  rollingUpdate:
    maxSurge: 2
    maxUnavailable: 2
  type: RollingUpdate

But harvester-webhook is not set as same.

It inherits the default one from k8s

spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app.kubernetes.io/component: webhook-server
      app.kubernetes.io/name: harvester
      app.kubernetes.io/part-of: harvester
      helm.sh/release: harvester
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
  1. The may lead to some issues on <3 node clusters like https://github.com/harvester/harvester/issues/6432

  2. Another example:

    On a single-node harvester cluster, edit the harvester-webhook deployment with a new image tag, the harvester-webhook POD will not be replaced at once, instead, you need to delete the current running POD manually to help the replaced POD to be running. After this patch, the POD will be replaced right now.

Describe the solution you'd like

Use same deployment upgrade strategy.

Describe alternatives you've considered

Additional context

harvesterhci-io-github-bot commented 1 week ago

Pre Ready-For-Testing Checklist

harvesterhci-io-github-bot commented 1 week ago

Automation e2e test issue: harvester/tests#1500