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-3333: Graduate RetroactiveDefaultStorageClass to beta in v1.26 #3544

Merged
merged 5 commits into from
Oct 3, 2022

Conversation

RomanBednar
Copy link
Contributor

  • One-line PR description: Graduate RetroactiveDefaultStorageClass feature to beta
  • Other comments:

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 23, 2022
@k8s-ci-robot k8s-ci-robot added kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 23, 2022
@wojtek-t wojtek-t self-assigned this Sep 23, 2022
Longer term, we may want to require automated upgrade/rollback tests, but we
are missing a bunch of machinery and tooling and can't do that now.
-->
Upgrade and rollback will be tested when the feature gate will change to beta.
Copy link
Member

Choose a reason for hiding this comment

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

Please send a dedicated KEP PR once you do this, before graduating the feature to beta in k/k (and assign both to SIG leads and myself).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, will do.

A metric which would include PersistentVolumeClaim name or StorageClass name
as a label to help users debug possible issues. A metric with such labels should
not be added because PVCs and SCs are in control of users and if they would
create too many of those resources it could overload the metric system.
Copy link
Member

Choose a reason for hiding this comment

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

Let's maybe rephrase that "such metric would have potentially unbounded cardinality, which is a hard blocker for adding it".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

ones.

Test:
https://github.com/kubernetes/kubernetes/blob/91a9ce28ac2486c50222aeeec1f76e664155d769/test/e2e/storage/pvc_storageclass.go#L62
Copy link
Member

Choose a reason for hiding this comment

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

Please link testgrid, there were few green runs in https://testgrid.k8s.io/sig-network-gce#gci-gce-alpha-features.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added.

@RomanBednar
Copy link
Contributor Author

RomanBednar commented Sep 27, 2022

Removed stage: section from kep.yaml but the CI test is complaining now:

time="2022-09-27T15:12:25Z" level=info msg="the following PRR validation errors occurred in /home/prow/go/src/github.com/kubernetes/enhancements/keps/sig-storage/3333-reconcile-default-storage-class/kep.yaml:"
time="2022-09-27T15:12:25Z" level=info msg="getting PRR approver for  stage: invalid stage: , should be one of [alpha beta stable]" 

@wojtek-t maybe the field removal is not yet reflected in CI?

stage: alpha
prr-approvers:
- "@deads2k"
- "@wojtek-t"
Copy link
Member

Choose a reason for hiding this comment

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

Please remove this section.

And readd back stage: beta - lack of it is failing validation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -352,68 +365,53 @@ enabled for the first time.

###### Are there any tests for feature enablement/disablement?

Unit tests will cover feature enablement/disablement.
Unit tests cover feature enablement/disablement.
Copy link
Member

Choose a reason for hiding this comment

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

Those aren't really testing feature enablement/disablement.
Those are testing feature itself (when the feature gate is on).

Feature enablement/disablement is the operation of enabling/disabling the feature (so changing the value of feature gate).

As mentioned in the comment in the KEP template, here is an example of such test:
https://github.com/kubernetes/kubernetes/pull/97058/files#diff-7826f7adbc1996a05ab52e3f5f02429e94b68ce6bce0dc534d1be636154fded3R246-R282

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see, something like this would be sufficient? kubernetes/kubernetes#112786

Copy link
Member

Choose a reason for hiding this comment

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

I am not sure such a test is applicable here - there is no new field that needs to be cleared / handled specially when the feature is disabled/enabled.
The feature gate just enables / disables a code path in PV controller and IMO that's covered by existing unit test,

Would it be enough just to mention that in this section?

Copy link
Member

Choose a reason for hiding this comment

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

Thinking more about it - I agree with @jsafrane - there is no new field here and there is no "migration phase" per-se.

So yes - I don't think we need additional code changes - just please explain it better in here in the text (roughly what @jsafrane wrote above).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I've added an explanation and closed the PR linked above.

- [ ] Other (treat as last resort)
- Details:
- Other field: `pvc.spec.storageClassName` changing from nil to current default StorageClass name after the default is set
- [X] Other (treat as last resort)
Copy link
Member

Choose a reason for hiding this comment

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

That's not really true - the metric is an aggregate, I can check if the feature is used, but not if my particular instance of PVC is using it.
Please unmark this one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -352,68 +365,48 @@ enabled for the first time.

###### Are there any tests for feature enablement/disablement?

Unit tests will cover feature enablement/disablement.
Unit test covers feature enablement/disablement:
<TODO: add a link once merged>
Copy link
Contributor

Choose a reason for hiding this comment

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

When do we add this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As discussed above - we won't be adding any new tests for this section.

@wojtek-t
Copy link
Member

wojtek-t commented Oct 3, 2022

/label tide/merge-method-squash

/approve PRR

Requires SIG-level approval still.

/assign @jsafrane
@jsafrane - can you please take this?

@k8s-ci-robot k8s-ci-robot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Oct 3, 2022
@jsafrane
Copy link
Member

jsafrane commented Oct 3, 2022

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 3, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jsafrane, RomanBednar, 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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 3, 2022
@k8s-ci-robot k8s-ci-robot merged commit 32bccf4 into kubernetes:master Oct 3, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.26 milestone Oct 3, 2022
ahmedtd pushed a commit to ahmedtd/enhancements that referenced this pull request Feb 2, 2023
…ubernetes#3544)

* update RetroactiveDefaultStorageClass for beta graduation

* address review comments 1

* address review comments 2

* address review comments 3

* address review comments 4
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/storage Categorizes an issue or PR as relevant to SIG Storage. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants