-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
KEP-2599: Promote STS minReadySeconds to GA #3354
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
ab4f9ae
to
d7ccec4
Compare
approver: "@ehashman" | ||
approver: "@ehashman" | ||
stable: | ||
approver: "@deads2k" |
There was a problem hiding this comment.
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.
There was a problem hiding this 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) | ||
|
There was a problem hiding this comment.
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]
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
d7ccec4
to
b9c992a
Compare
There was a problem hiding this 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` |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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..
/lgtm /hold - to address the comment from @soltysh |
4e91610
to
5bcb2a9
Compare
There was a problem hiding this 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
[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 |
Promote STS minReadySeconds to GA
Add minReadySeconds to Statefulsets #2599