Skip to content

Conversation

@AndrewMRQuinn
Copy link

@AndrewMRQuinn AndrewMRQuinn commented Dec 23, 2025

General information

The maxUnavailable field is available for StatefulSets by default as of Kubernetes v1.35, and defaults to an integer value of 1. https://kubernetes.io/blog/2025/12/17/kubernetes-v1-35-release/#maxunavailable-for-statefulsets

The StatefulSetRollingUpdate class only accepted a string value, resulting in a validation error after updating to Kubernetes v1.35.

Bug reports

After updating to Kubernetes 1.35, monitoring failed for clusters containing StatefulSets. This was running on Talos Linux 1.12, which uses standard/upstream Kubernetes.
Runing cmk --debug -vvn mycluster showed the following problem:

Agent exited with code 1: 1 validation error for StatefulSetRollingUpdate
max_unavailable
  Input should be a valid string [type=string_type, input_value=1, input_type=int]
    For further information visit https://errors.pydantic.dev/2.10/v/string_type(!!)

Inspecting StatefulSets with kubectl get statefulset mystatefulset -o yaml showed the following configuration, with maxUnavailable set to an integer value of 1. This is a default value set by Kubernetes. It was not part of the manifest file.

    updateStrategy:
      rollingUpdate:
        maxSurge: 0
        maxUnavailable: 1
      type: RollingUpdate

Proposed changes

Allow max_unavailable StatefulSetRollingUpdate to accept integer values,
The PR allows both str and int, matching the RollingUpdate class in the same file. str may not be necessary, but I can't be confident that removing it wouldn't cause problems for someone else, hence matching RollingUpdate.

The maxUnavailable field is available for StatefulSets by default as of Kubernetes v1.35, and defaults to an integer value of 1.
https://kubernetes.io/blog/2025/12/17/kubernetes-v1-35-release/#maxunavailable-for-statefulsets

The StatefulSetRollingUpdate class only accepted a string value, resulting in a validation error after updating to Kubernetes v1.35.

The change allows an integer or a string, matching the RollingUpdate class.
@github-actions
Copy link

github-actions bot commented Dec 23, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@AndrewMRQuinn
Copy link
Author

I have read the CLA Document and I hereby sign the CLA or my organization already has a signed CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants