Skip to content

Move GetPersistentVolumeClaimClass to component-helpers #98433

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

Merged

Conversation

damemi
Copy link
Member

@damemi damemi commented Jan 26, 2021

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
The goal of this move is related to issue #89930, to break the dependence
of scheduling plugins on internal helpers. This function can easily move to
component-helpers where it will be used by other components as well.

Which issue(s) this PR fixes:
Ref #89930
Replaces #90006

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Jan 26, 2021
Copy link
Member Author

@damemi damemi left a comment

Choose a reason for hiding this comment

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

/sig scheduling
/cc @ahg-g @ingvagabund

@k8s-ci-robot k8s-ci-robot added sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jan 26, 2021
@damemi
Copy link
Member Author

damemi commented Jan 26, 2021

/sig storage

@k8s-ci-robot k8s-ci-robot added the sig/storage Categorizes an issue or PR as relevant to SIG Storage. label Jan 26, 2021
@k8s-ci-robot k8s-ci-robot requested review from cofyc and deads2k January 26, 2021 16:23
@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. labels Jan 26, 2021
@damemi damemi force-pushed the remove-helper-from-volume-zone branch from 5ba84ab to f2eb6d4 Compare January 26, 2021 18:18

// GetPersistentVolumeClaimClass returns StorageClassName. If no storage class was
// requested, it returns "".
func GetPersistentVolumeClaimClass(claim *v1.PersistentVolumeClaim) string {
Copy link
Member

Choose a reason for hiding this comment

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

Can we move GetPersistentVolumeClass as well since the two functions are related.

Also, I don't see pkg/apis/core/v1/helper/helpers.go being updated, shouldn't the function be removed from there?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah yeah, I missed that. updated

@damemi damemi force-pushed the remove-helper-from-volume-zone branch from f2eb6d4 to 1e06964 Compare January 26, 2021 19:56
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 26, 2021
@ahg-g
Copy link
Member

ahg-g commented Jan 26, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 26, 2021
@damemi
Copy link
Member Author

damemi commented Jan 26, 2021

/assign @deads2k @saad-ali @thockin

@jsafrane
Copy link
Member

/approve
from sig-storage POV.

@ingvagabund
Copy link
Contributor

The helpers are duplicated in staging/src/k8s.io/kubectl/pkg/util/storage/storage.go. Worth deleting those and pointing their imports to component-helpers as well.

@damemi
Copy link
Member Author

damemi commented Jan 27, 2021

The helpers are duplicated in staging/src/k8s.io/kubectl/pkg/util/storage/storage.go. Worth deleting those and pointing their imports to component-helpers as well.

I think this could be a follow-up PR. Since kubectl is already duplicating them, this move doesn't directly affect them. So in the interest of keeping the scope of this PR just to the necessary changes I would prefer to make that change later

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 30, 2021
@damemi damemi force-pushed the remove-helper-from-volume-zone branch from 1e06964 to 834b47c Compare February 1, 2021 15:18
@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Feb 1, 2021
The goal of this move is related to issue 89930, to break the dependence
of scheduling plugins on internal helpers. This function can easily move to
component-helpers where it will be used by other components as well.
@damemi damemi force-pushed the remove-helper-from-volume-zone branch from 834b47c to ba72411 Compare February 1, 2021 15:48
@fedebongio
Copy link
Contributor

/remove-sig api-machinery

@k8s-ci-robot k8s-ci-robot removed the sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. label Feb 2, 2021
@ahg-g
Copy link
Member

ahg-g commented Feb 25, 2021

/assign @liggitt

Sorry Jordan, but you seem to be the only one who can approve the rest :)

@ahg-g
Copy link
Member

ahg-g commented Feb 25, 2021

/assign @BenTheElder

for vendor/

@liggitt
Copy link
Member

liggitt commented Feb 26, 2021

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: damemi, ingvagabund, jsafrane, liggitt

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 Feb 26, 2021
@ahg-g
Copy link
Member

ahg-g commented Feb 26, 2021

/priority important-soon
/triage accepted

@k8s-ci-robot k8s-ci-robot added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 26, 2021
@ahg-g
Copy link
Member

ahg-g commented Feb 26, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 26, 2021
@ahg-g
Copy link
Member

ahg-g commented Feb 26, 2021

/retest

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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. 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. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.