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

KEP-2599: Promote STS minReadySeconds to GA #3354

Conversation

ravisantoshgudimetla
Copy link
Contributor

  • One-line PR description:
    Promote STS minReadySeconds to GA
  • Other comments:

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 7, 2022
@k8s-ci-robot k8s-ci-robot requested a review from kow3ns June 7, 2022 22:14
@k8s-ci-robot k8s-ci-robot added the kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory label Jun 7, 2022
@k8s-ci-robot k8s-ci-robot requested a review from soltysh June 7, 2022 22:14
@k8s-ci-robot k8s-ci-robot added the sig/apps Categorizes an issue or PR as relevant to SIG Apps. label Jun 7, 2022
@ravisantoshgudimetla ravisantoshgudimetla changed the title Promote STS minReadySeconds to GA KEP-2599: Promote STS minReadySeconds to GA Jun 7, 2022
Copy link
Contributor

@soltysh soltysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ravisantoshgudimetla a couple of nits


Following e2e tests are added to statefulsets.
- minReadySeconds when present should be honored
- AvailableReplicas should get updated accordingly when minReadySeconds is set
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC those tests already exists, also from template:

For Beta and GA, add links to added tests together with links to k8s-triage for those tests:
https://storage.googleapis.com/k8s-triage/index.html

@@ -273,6 +306,8 @@ API validation, behavioral change of StatefulSet with feature gate enabled and d

#### Beta -> GA Graduation
- 2 examples of end users using this field
- The latest version of OpenShift is using this field for some control plane components
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link with pointers, is possible?

@@ -7,7 +7,7 @@ participating-sigs:
- "sig-apps"
status: implementable
creation-date: 2021-04-07
last-updated: 2021-04-12
last-updated: 2022-06-07
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add @deads2k to prr-approvers below

@ravisantoshgudimetla ravisantoshgudimetla force-pushed the promote-minReadySec-sts-ga branch from ab4f9ae to d7ccec4 Compare June 8, 2022 22:43
approver: "@ehashman"
approver: "@ehashman"
stable:
approver: "@deads2k"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

David already has quite a lot PRRs this cycle - please switch to me and I will take a look soon.

@wojtek-t wojtek-t self-assigned this Jun 9, 2022
Copy link
Member

@wojtek-t wojtek-t left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple clarifying comments from me.

Following e2e tests are added to statefulsets.
- StatefulSet MinReadySeconds should be honored when enabled: [test grid](https://testgrid.k8s.io/sig-apps#gce)
- StatefulSet AvailableReplicas should get updated accordingly when MinReadySeconds is enabled: [test grid](https://testgrid.k8s.io/sig-apps#gce)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments for lines that I can't comment on:

L356: "we will set minReadySeconds to 0" - who exactly is "we"? Do we really set it?
Or do we implicitly default it on the controller side?

L357: "The default value of AvailableReplicas would be value of existing field in Status sub-resource called ReadyReplicas" - do we really default that field? This seems wrong.
It's just controller should start setting this field (together with other status fields).

L362: kube-apiserver will not clear automatically the field; it may be cleared if someone overwrites the object (not using patch). What happens in practice?

L431: please link?
[also - are they testing enablement/disablement (so switching on/off the feature in the middle of the test) or rather how it works with feature enabled and separately disabled]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L356: "we will set minReadySeconds to 0" - who exactly is "we"? Do we really set it?

minReadySeconds is an int32 whose default value is 0. We don't explicitly set it in defaults.go, if that is what you're asking

"The default value of AvailableReplicas would be value of existing field in Status sub-resource called ReadyReplicas" - do we really default that field? This seems wrong.

I think by default you mean the value which will be present in defaults.go. No, we don't set the value there.
If minReadySeconds is 0, the default behavior of the controller is to set all the ready replicas as available replicas.

L362: kube-apiserver will not clear automatically the field; it may be cleared if someone overwrites the object (not using patch). What happens in practice?

The values continue to exist but won't be honored by the controller. I updated the statement to reflect it.

[also - are they testing enablement/disablement (so switching on/off the feature in the middle of the test) or rather how it works with feature enabled and separately disabled]

Not in the middle of tests but run test with feature enabled and then run the same test when the feature is disabled. Added the same in test plan section. Do you want anything else to be added?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think by default you mean the value which will be present in defaults.go. No, we don't set the value there.
If minReadySeconds is 0, the default behavior of the controller is to set all the ready replicas as available replicas.

Please adjust then to say that "it's the controller that sets this field to the same value as ReadyReplicas.
This is different then defaulting (e.g. it's asynchronous).

Not in the middle of tests but run test with feature enabled and then run the same test when the feature is disabled. Added the same in test plan section. Do you want anything else to be added?

Which is not really the enablement/disablement - we're testing the feature on and off.
It's a bit too late to ask for it, so I won't ask for adding such tests now, but please clarify in the doc that you're not testing enablement/disablement, but rather the feature being on and off.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please adjust then to say that "it's the controller that sets this field to the same value as ReadyReplicas.

I did that in the last commit.

It's a bit too late to ask for it, so I won't ask for adding such tests now, but please clarify in the doc that you're not testing enablement/disablement, but rather the feature being on and off.

Sure. I updated the wording. If you have an example of how to enable/disable, I can try fitting it into this release. I was following the doc at https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api_changes.md#new-field-in-existing-api-version

@marosset marosset mentioned this pull request Jun 9, 2022
12 tasks
@ravisantoshgudimetla ravisantoshgudimetla force-pushed the promote-minReadySec-sts-ga branch from d7ccec4 to b9c992a Compare June 9, 2022 20:12
Copy link
Contributor

@soltysh soltysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 minor nits, but overall
/lgtm
/approve

- If `minReadySeconds` is equal to 0 -- in this case user wont see any
difference in behavior
difference in behavior. The `AvailableReplicas` will be set to `ReadyReplicas`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit 2 lines above:
s/in this case user wont see any/in this case user won't see any/g

reviewers:
- "@soltysh"
approvers:
- "@soltysh"
prr-approvers:
- "@ehashman"
- "@deads2k"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wojtek-t per above change

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't care about it - it's a duplicate with the file in prod-readiness dir.
I'm planning to get to it at some point and remove this field from everywhere..

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 13, 2022
@wojtek-t
Copy link
Member

/lgtm
/approve PRR

/hold - to address the comment from @soltysh

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jun 13, 2022
@ravisantoshgudimetla ravisantoshgudimetla force-pushed the promote-minReadySec-sts-ga branch from 4e91610 to 5bcb2a9 Compare June 13, 2022 13:32
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 13, 2022
Copy link
Contributor

@soltysh soltysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve
/hold cancel

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Jun 13, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ravisantoshgudimetla, soltysh, wojtek-t

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 5cde0fc into kubernetes:master Jun 13, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.25 milestone Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/apps Categorizes an issue or PR as relevant to SIG Apps. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants