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

Cleanup/remove service affinity plugin #105588

Conversation

kerthcet
Copy link
Member

@kerthcet kerthcet commented Oct 9, 2021

What type of PR is this?

/kind cleanup
/sig scheduling

What this PR does / why we need it:

part of kubernetes/enhancements#2901

Which issue(s) this PR fixes:

Part of #92143

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

- [KEP]: https://github.com/kubernetes/enhancements/issues/2901

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. 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 Oct 9, 2021
@k8s-ci-robot
Copy link
Contributor

@kerthcet: This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added 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. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels Oct 9, 2021
@kerthcet kerthcet marked this pull request as ready for review October 9, 2021 14:28
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 9, 2021
@k8s-triage-robot
Copy link

This PR may require API review.

If so, when the changes are ready, complete the pre-review checklist and request an API review.

Status of requested reviews is tracked in the API Review project.

@kerthcet kerthcet force-pushed the cleanup/remove-servfice-affinity-plugin branch from 2a1d38c to b8700ec Compare October 12, 2021 11:45
Copy link
Member

@Huang-Wei Huang-Wei left a comment

Choose a reason for hiding this comment

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

some nits. LGTM otherwise.

pkg/scheduler/apis/config/validation/validation_test.go Outdated Show resolved Hide resolved
pkg/scheduler/apis/config/validation/validation_test.go Outdated Show resolved Hide resolved
Comment on lines -734 to -743
{
name: "different weights for ServiceAntiAffinity custom priority",
policy: config.Policy{
Priorities: []config.PriorityPolicy{
{Name: "customPriority1", Weight: 1, Argument: &config.PriorityArgument{ServiceAntiAffinity: &config.ServiceAntiAffinity{}}},
{Name: "customPriority2", Weight: 2, Argument: &config.PriorityArgument{ServiceAntiAffinity: &config.ServiceAntiAffinity{}}},
},
},
expected: errors.New("ServiceAntiAffinity priority \"customPriority2\" has a different weight with \"customPriority1\""),
},
Copy link
Member

Choose a reason for hiding this comment

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

Ditto. Replace it instead of removing it.

Copy link
Member Author

Choose a reason for hiding this comment

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

different weights test covered here, and the logic is defined here, I thought there's no need to keep this test anymore.

pkg/scheduler/framework/plugins/legacy_registry.go Outdated Show resolved Hide resolved
@kerthcet kerthcet force-pushed the cleanup/remove-servfice-affinity-plugin branch from b8700ec to c32f617 Compare October 14, 2021 05:22
@Huang-Wei
Copy link
Member

/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 15, 2021
@Huang-Wei
Copy link
Member

@kubernetes/api-reviewers for API review.

pkg/scheduler/apis/config/validation/validation.go Outdated Show resolved Hide resolved
pkg/scheduler/apis/config/validation/validation.go Outdated Show resolved Hide resolved
pkg/scheduler/apis/config/validation/validation_test.go Outdated Show resolved Hide resolved
pkg/scheduler/apis/config/validation/validation.go Outdated Show resolved Hide resolved
@@ -72,9 +72,6 @@ type PriorityPolicy struct {
// PredicateArgument represents the arguments to configure predicate functions in scheduler policy configuration.
// Only one of its members may be specified
type PredicateArgument struct {
// The predicate that provides affinity for pods belonging to a service
Copy link
Member

Choose a reason for hiding this comment

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

@liggitt this may look strange, removing v1 types; but those types are not usable now that we completely removed the flag that allowed specifying the old policy configuration file and v1beta1 CC which used those types.

Copy link
Member

Choose a reason for hiding this comment

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

is it expected that the legacy types are removed piece mill? if we really can't load that file any more, can all the types in legacy_types be removed?

Copy link
Member

Choose a reason for hiding this comment

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

if we really can't load that file any more, can all the types in legacy_types be removed?

Yes, we will raise a PR right after this one to remove legacy_types.

Copy link
Member

Choose a reason for hiding this comment

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

yes, we want to remove the whole file, but there are a lot of things that needs cleaning up internally and this PR will help make the following one more manageable.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 15, 2021
@kerthcet
Copy link
Member Author

/test pull-kubernetes-unit

Signed-off-by: kerthcet <kerthcet@gmail.com>
@kerthcet kerthcet force-pushed the cleanup/remove-servfice-affinity-plugin branch from 9ced79d to fc9533e Compare October 15, 2021 14:10
@ahg-g
Copy link
Member

ahg-g commented Oct 18, 2021

/label api-review

@k8s-ci-robot k8s-ci-robot added the api-review Categorizes an issue or PR as actively needing an API review. label Oct 18, 2021
@ahg-g
Copy link
Member

ahg-g commented Oct 18, 2021

please updated the description to say it is part of #92143

@ahg-g
Copy link
Member

ahg-g commented Oct 20, 2021

/lgtm
/approve

/label api-review

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

liggitt commented Oct 20, 2021

/approve

@liggitt liggitt added this to API review completed, 1.23 in API Reviews Oct 20, 2021
@liggitt
Copy link
Member

liggitt commented Oct 20, 2021

if this was already not usable because the legacy policy file could not be set, no release note is needed

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahg-g, Huang-Wei, kerthcet, 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 approved Indicates a PR has been approved by an approver from all required OWNERS files. release-note-none Denotes a PR that doesn't merit a release note. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Oct 20, 2021
@kerthcet
Copy link
Member Author

if this was already not usable because the legacy policy file could not be set, no release note is needed

gotcha, done.

@k8s-ci-robot k8s-ci-robot merged commit 9c97ae2 into kubernetes:master Oct 20, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.23 milestone Oct 20, 2021
@kerthcet kerthcet deleted the cleanup/remove-servfice-affinity-plugin branch October 21, 2021 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-review Categorizes an issue or PR as actively needing an API review. 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/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API 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. 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. release-note-none Denotes a PR that doesn't merit a release note. 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
Status: API review completed, 1.23
Development

Successfully merging this pull request may close these issues.

None yet

6 participants