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

Create pkg/scheduling/apis/v1beta1 and move priorityClass to beta #63100

Merged

Conversation

ravisantoshgudimetla
Copy link
Contributor

@ravisantoshgudimetla ravisantoshgudimetla commented Apr 24, 2018

What this PR does / why we need it:
This is for creating pkg/apis/scheduling/v1beta1 so that priorityClasses could be moved to beta.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Part of #57471

Special notes for your reviewer:
/cc @bsalamat @aveshagarwal

Release note:

The `PriorityClass` API is promoted to `scheduling.k8s.io/v1beta1`

@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Apr 24, 2018
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 24, 2018
@ravisantoshgudimetla ravisantoshgudimetla force-pushed the priority-beta-api branch 2 times, most recently from 302c5a1 to 30f7f25 Compare April 24, 2018 21:24
@@ -66,6 +66,7 @@ pkg/apis/rbac/v1beta1
pkg/apis/rbac/validation
pkg/apis/scheduling
pkg/apis/scheduling/v1alpha1
Copy link
Member

Choose a reason for hiding this comment

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

why are you keeping v1alpha1?

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 as I understand, it might be needed, if some apis are alpha and some are beta?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is correct. I think we don't have a beta group for scheduling yet. So, we need it say if new api like priorityClass comes up in future.

@@ -37,12 +38,13 @@ func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *r
if err := announced.NewGroupMetaFactory(
&announced.GroupMetaFactoryArgs{
GroupName: scheduling.GroupName,
VersionPreferenceOrder: []string{v1alpha1.SchemeGroupVersion.Version},
VersionPreferenceOrder: []string{v1beta1.SchemeGroupVersion.Version, v1alpha1.SchemeGroupVersion.Version},
RootScopedKinds: sets.NewString("PriorityClass"),
Copy link
Member

Choose a reason for hiding this comment

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

Here it says that rootscopekind is PriorityClass? So wondering why to keep both v1alpha1 and v1beta1 if its only for priorityclass?

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 am not a 100% sure. I believe it is because of backward compatibility. I have looked at existing API which have graduated to beta and all of them have this pattern of beta and alpha.

Copy link
Member

Choose a reason for hiding this comment

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

In my understanding, there is no guarantee provided by Kubernetes of backward compatibility for alpha apis. See the alpha api section: https://kubernetes.io/docs/concepts/overview/kubernetes-api/

Copy link
Member

@bsalamat bsalamat left a comment

Choose a reason for hiding this comment

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

Looks generally good, but I am not so sure about keeping v1alpha1. API folks can help us review that part.
Please make sure verifications and tests pass.

@aveshagarwal
Copy link
Member

@liggitt

@ravisantoshgudimetla ravisantoshgudimetla force-pushed the priority-beta-api branch 2 times, most recently from 538bd90 to 2542a83 Compare April 25, 2018 21:37
@ravisantoshgudimetla
Copy link
Contributor Author

Looks generally good, but I am not so sure about keeping v1alpha1. API folks can help us review that part.

You mean priorityClass in v1alpha1 or remove v1alpha1 in general?

Please make sure verifications and tests pass.

Yes. There was an issue with go 1.9 version on my machine for gofmt. Changing to 1.10.1 solved it.

@ravisantoshgudimetla
Copy link
Contributor Author

@kubernetes/sig-scheduling-pr-reviews @kubernetes/api-reviewers

@k8s-ci-robot k8s-ci-robot added the sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. label Apr 25, 2018
@bsalamat
Copy link
Member

You mean priorityClass in v1alpha1 or remove v1alpha1 in general?

Removing priorityClass from v1alpha1 and since it is the only item there, maybe removing v1alpha1 as well. Basically, I would like to know what the recommended workflow is when we graduate an API to beta.

@k82cn
Copy link
Member

k82cn commented Apr 26, 2018

AFAIK, we should remove v1alpha1 in graduation :)

@ravisantoshgudimetla
Copy link
Contributor Author

ravisantoshgudimetla commented Apr 26, 2018

Removing priorityClass from v1alpha1 and since it is the only item there, maybe removing v1alpha1 as well. Basically, I would like to know what the recommended workflow is when we graduate an API to beta.

@bsalamat bsalamat added this to the v1.11 milestone Apr 26, 2018
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 26, 2018
@bsalamat bsalamat added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Apr 26, 2018
@k8s-github-robot k8s-github-robot removed this from the v1.11 milestone Apr 30, 2018
@aveshagarwal
Copy link
Member

@bsalamat can you check why it was removed from 1.11 milestone?

@ravisantoshgudimetla
Copy link
Contributor Author

/retest

@ravisantoshgudimetla
Copy link
Contributor Author

/retest

@ravisantoshgudimetla
Copy link
Contributor Author

/test pull-kubernetes-e2e-kops-aws

@@ -302,7 +302,7 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS
HugePages: {Default: true, PreRelease: utilfeature.Beta},
DebugContainers: {Default: false, PreRelease: utilfeature.Alpha},
PodShareProcessNamespace: {Default: false, PreRelease: utilfeature.Alpha},
PodPriority: {Default: false, PreRelease: utilfeature.Alpha},
Copy link
Member

@liggitt liggitt May 12, 2018

Choose a reason for hiding this comment

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

@aveshagarwal are the quota controls in place to allow this to be enabled by default? (flipping the feature gate isn't required to add v1beta1 priority classes)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@liggitt I believe you are talking about #57963, this got an lgtm but waiting on approval from @bsalamat

Copy link
Member

@liggitt liggitt May 12, 2018

Choose a reason for hiding this comment

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

yes, that. until that is available, we should not enable the feature by default.

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 will make this alpha so that this PR can go ahead.

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. PTAL

@liggitt
Copy link
Member

liggitt commented May 12, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 12, 2018
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 12, 2018
@liggitt
Copy link
Member

liggitt commented May 12, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 12, 2018
@ravisantoshgudimetla
Copy link
Contributor Author

/retest

@ravisantoshgudimetla
Copy link
Contributor Author

ravisantoshgudimetla commented May 12, 2018

@liggitt Thanks for the review.

/assign @smarterclayton

@k8s-github-robot
Copy link

[MILESTONENOTIFIER] Milestone Pull Request: Up-to-date for process

@liggitt @ravisantoshgudimetla @smarterclayton

Pull Request Labels
  • sig/scheduling: Pull Request will be escalated to these SIGs if needed.
  • priority/important-soon: Escalate to the pull request owners and SIG owner; move out of milestone after several unsuccessful escalation attempts.
  • kind/feature: New functionality.
Help

@smarterclayton
Copy link
Contributor

/approve

based on api approver comments and sig approval

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt, ravisantoshgudimetla, smarterclayton

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 May 14, 2018
@ravisantoshgudimetla
Copy link
Contributor Author

Thanks @smarterclayton

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 55511, 63372, 63400, 63100, 63769). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit a1b54f3 into kubernetes:master May 14, 2018
@ravisantoshgudimetla ravisantoshgudimetla deleted the priority-beta-api branch May 14, 2018 21:54
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/feature Categorizes issue or PR as related to a new feature. 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 Denotes a PR that will be considered when it comes time to generate release notes. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants