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

StatefulSetStatus attribute availableReplicas set to required by mistake? #109210

Closed
ca-scribner opened this issue Mar 31, 2022 · 5 comments · Fixed by #109241
Closed

StatefulSetStatus attribute availableReplicas set to required by mistake? #109210

ca-scribner opened this issue Mar 31, 2022 · 5 comments · Fixed by #109241
Labels
kind/bug Categorizes issue or PR as related to a bug. kind/documentation Categorizes issue or PR as related to documentation. kind/regression Categorizes issue or PR as related to a regression from a prior release. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/apps Categorizes an issue or PR as relevant to SIG Apps.

Comments

@ca-scribner
Copy link

What happened?

Looking at the swagger specifications for StatefulSetStatus, it defines availableReplicas as a required attribute. But looking at the description of availableReplicas, it states ...This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate. Should this in fact be a required attribute?

I come about this from using lightkube, a python package that generates models from the swagger definitions and thus builds a StatefulSetStatus that requires an attribute that is not enabled.

What did you expect to happen?

That only truly required attributes be required in the swagger definition

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

Reproduction is not applicable as this is an issue with a spec

Anything else we need to know?

No response

Kubernetes version

Appeared in 1.22 (I believe) and affects current versions. Does not affect 1.21

Cloud provider

n/a

OS version

No response

Install tools

No response

Container runtime (CRI) and version (if applicable)

No response

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

No response

@ca-scribner ca-scribner added the kind/bug Categorizes issue or PR as related to a bug. label Mar 31, 2022
@k8s-ci-robot k8s-ci-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Mar 31, 2022
@k8s-ci-robot
Copy link
Contributor

@ca-scribner: This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Mar 31, 2022
@neolit123
Copy link
Member

neolit123 commented Mar 31, 2022

alpha:
#100842
#100842 (review)
has +optional that is planned for removal in beta.
(+optional results in fields as non-required in the OpenAPI)

beta:
https://github.com/kubernetes/kubernetes/pull/104045/files
removes the +optional

this might be a question whether feature gate controlled fields must remain +optional until the feature gate is removed (and how would validation work in that case).
old feature gates graduations to beta enabled a feature by default.

a topic related to #108279 ?
but it does not apply to feature gates.

/kind documentation
/sig apps

@k8s-ci-robot k8s-ci-robot added kind/documentation Categorizes issue or PR as related to documentation. sig/apps Categorizes an issue or PR as relevant to SIG Apps. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Mar 31, 2022
@neolit123
Copy link
Member

cc @ravisantoshgudimetla
(since you are the KEP author)

@liggitt
Copy link
Member

liggitt commented Apr 1, 2022

new fields added to existing types must always be marked as +optional, since clients are not required to specify them

@liggitt
Copy link
Member

liggitt commented Apr 1, 2022

please open a PR adding back the +optional tag, regenerate openapi, and open picks back to 1.23 and 1.22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. kind/documentation Categorizes issue or PR as related to documentation. kind/regression Categorizes issue or PR as related to a regression from a prior release. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/apps Categorizes an issue or PR as relevant to SIG Apps.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants