Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to partition update an native statefulset in batch #180

Open
IamIpanda opened this issue Oct 25, 2023 · 1 comment
Open

How to partition update an native statefulset in batch #180

IamIpanda opened this issue Oct 25, 2023 · 1 comment

Comments

@IamIpanda
Copy link

We're using a quite conservative k8s strategy, and now on 1.24, without alpha features. (No MaxUnavailable field.) Most of our workloads are native StatefulSet and we cannot change it.

Now we want to make its rollout quicker with 25% pods MaxUnavailable. I write a rollout like this:

apiVersion: rollouts.kruise.io/v1alpha1
kind: Rollout
metadata:
  name: foo
  annotations:
    rollouts.kruise.io/rolling-style: partition
spec:
  objectRef:
    workloadRef:
      apiVersion: apps/v1
      kind: StatefulSet
      name: foo
  strategy:
    canary:
      steps:
      - replicas: 1
      - replicas: 25%
      - replicas: 50%
      - replicas: 75%
      - replicas: 100%

The sts: podManagementPolicy is Parallel, updateStrategy is type: RollingUpdate

Now rollout works, but during its steps, it still rollout its pods one by one like native, not in batch. I want inner step, just remove all pods in this step. Is this supported? Or do I config something wrong?

Thanks.

@furykerry
Copy link
Member

I'm afraid it is not supported, kruise rollout still relies on the referenced workload to manage the pod, and it make no sense to support the maxUnavailable of native statefulset below 1.24.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants