Skip to content

Parallel pod management with maxUnavailable set should not ignore minReadySeconds #112307

@euroelessar

Description

@euroelessar

What happened?

StatefulSet spec's template was updated:

Details
items:
- apiVersion: apps/v1
  kind: StatefulSet
  # many other unrelated stuff
  spec:
    replicas: 5
    minReadySeconds: 300
    podManagementPolicy: Parallel
    updateStrategy:
      rollingUpdate:
        maxUnavailable: 1

Kubernetes has updated all pods one-by-one in a quick succession, the next pod was updated as soon as previous one has passed the startup probe.
status.availableReplicas has dropped from 5 to 0 over the course of the push (which took ≈3 minutes).

What did you expect to happen?

I did expected that kubernetes would update pods one-by-one, taking minReadySeconds into account, the next pod was expected to be updated minReadySeconds seconds after previous one has passed the startup probe.
status.availableReplicas should not have been dropped below 4 at any point (as maxUnavailable is explicitly set to 1).

How can we reproduce it (as minimally and precisely as possible)?

Create a StatefulSet with the spec above, and update its spec.template field to trigger a rollout.
MaxUnavailableStatefulSet and StatefulSetMinReadySeconds feature gates must be enabled.

Anything else we need to know?

No response

Kubernetes version

Details
$ kubectl version
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.4-dbx2", GitCommit:"95ee5ab382d64cfe6c28967f36b53970b8374491", GitTreeState:"clean", BuildDate:"2001-09-09T01:46:40Z", GoVersion:"go1.18.5", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.4
Server Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.4-dbx2", GitCommit:"95ee5ab382d64cfe6c28967f36b53970b8374491", GitTreeState:"clean", BuildDate:"2001-09-09T01:46:40Z", GoVersion:"go1.18.5", Compiler:"gc", Platform:"linux/amd64"}

Cloud provider

Details In-house kubernetes setup.

OS version

Details
# On Linux:
$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
$ uname -a
Linux $hostname 5.15.0-39-generic #42-Ubuntu SMP Thu Jun 9 23:42:32 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Install tools

Details

Container runtime (CRI) and version (if applicable)

Details

Related plugins (CNI, CSI, ...) and versions (if applicable)

Details

Metadata

Metadata

Labels

kind/bugCategorizes issue or PR as related to a bug.priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release.sig/appsCategorizes an issue or PR as relevant to SIG Apps.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions