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

Add the finalizer via webhook when creating resourceFlavor #299

Merged

Conversation

kerthcet
Copy link
Contributor

Signed-off-by: kerthcet kerthcet@gmail.com

What type of PR is this?

/kind feature

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #283

Special notes for your reviewer:

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 15, 2022
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 15, 2022
@kerthcet kerthcet force-pushed the feat/add-webhook-to-resourceFlavor branch from ff7dfc1 to 0a5c402 Compare July 15, 2022 10:09
apis/kueue/v1alpha1/resource_flavor_webhook.go Outdated Show resolved Hide resolved
main.go Outdated
@@ -177,6 +177,10 @@ func setupControllers(mgr ctrl.Manager, cCache *cache.Cache, queues *queue.Manag
setupLog.Error(err, "unable to create webhook", "webhook", "Workload")
os.Exit(1)
}
if err := (&kueuev1alpha1.ResourceFlavor{}).SetupWebhookWithManager(mgr); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should have a function in pkg/controller/core that adds all the webhooks

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 was intended to add this when adding webhook to clusterQueue, in this pr is fine too.

test/integration/controller/core/suite_test.go Outdated Show resolved Hide resolved
test/integration/webhook/v1alpha1/resourceFlavor_test.go Outdated Show resolved Hide resolved
test/integration/webhook/v1alpha1/resourceFlavor_test.go Outdated Show resolved Hide resolved
test/integration/webhook/v1alpha1/suite_test.go Outdated Show resolved Hide resolved
@kerthcet kerthcet force-pushed the feat/add-webhook-to-resourceFlavor branch from deaa278 to 95f98ed Compare July 16, 2022 02:02
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 19, 2022
@kerthcet kerthcet force-pushed the feat/add-webhook-to-resourceFlavor branch from d552944 to 88211b2 Compare July 19, 2022 12:02
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 19, 2022
@ahg-g
Copy link
Contributor

ahg-g commented Jul 19, 2022

pls squash

1 similar comment
@ahg-g
Copy link
Contributor

ahg-g commented Jul 19, 2022

pls squash

Signed-off-by: kerthcet <kerthcet@gmail.com>
@kerthcet kerthcet force-pushed the feat/add-webhook-to-resourceFlavor branch from 88211b2 to 05174cb Compare July 19, 2022 14:54
@kerthcet
Copy link
Contributor Author

squashed

@ahg-g
Copy link
Contributor

ahg-g commented Jul 19, 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 Jul 19, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahg-g, kerthcet

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 Jul 19, 2022
@k8s-ci-robot k8s-ci-robot merged commit 8c76179 into kubernetes-sigs:main Jul 19, 2022
@kerthcet kerthcet deleted the feat/add-webhook-to-resourceFlavor branch July 19, 2022 15:05
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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the finalizer via webhook when creating resourceFlavor
4 participants