Skip to content

GC: update required verbs for deletable resources, allow list of ignored resources to be customized#45897

Merged
k8s-github-robot merged 2 commits intokubernetes:masterfrom
ncdc:gc-require-list-watch
May 23, 2017
Merged

GC: update required verbs for deletable resources, allow list of ignored resources to be customized#45897
k8s-github-robot merged 2 commits intokubernetes:masterfrom
ncdc:gc-require-list-watch

Conversation

@ncdc
Copy link
Copy Markdown
Member

@ncdc ncdc commented May 16, 2017

The garbage collector controller currently needs to list, watch, get,
patch, update, and delete resources. Update the criteria for
deletable resources to reflect this.

Also allow the list of resources the garbage collector controller should
ignore to be customizable, so downstream integrators can add their own
resources to the list, if necessary.

cc @caesarxuchao @deads2k @smarterclayton @mfojtik @liggitt @sttts @kubernetes/sig-api-machinery-pr-reviews

@ncdc ncdc added the release-note-none Denotes a PR that doesn't merit a release note. label May 16, 2017
@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 16, 2017
@mfojtik
Copy link
Copy Markdown
Contributor

mfojtik commented May 16, 2017

@ncdc nicely done! code lgtm.

@k8s-github-robot k8s-github-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 16, 2017
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rename to DefaultIgnoredResources()?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Updated

@caesarxuchao
Copy link
Copy Markdown
Contributor

Last two commits lgtm except for a nit.

@ncdc ncdc force-pushed the gc-require-list-watch branch 2 times, most recently from a1cce10 to d31fedd Compare May 16, 2017 20:13
@soltysh
Copy link
Copy Markdown
Contributor

soltysh commented May 17, 2017

lgtm for the last two commits.

@ncdc ncdc force-pushed the gc-require-list-watch branch from d31fedd to a52aa5d Compare May 22, 2017 17:03
@ncdc ncdc added this to the v1.7 milestone May 22, 2017
@ncdc ncdc force-pushed the gc-require-list-watch branch from a52aa5d to a2a9dfa Compare May 23, 2017 12:39
@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 23, 2017
@ncdc
Copy link
Copy Markdown
Member Author

ncdc commented May 23, 2017

Rebased on top of master now that #45427 is in. @deads2k tag if this looks good to you?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pretty sure that we use a live "get" to confirm existence and "patch" to orphan resources.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

So you want to make sure that for any resource we might want to gc or orphan, that we can get/list/watch/patch/delete?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So you want to make sure that for any resource we might want to gc or orphan, that we can get/list/watch/patch/delete?

Yes

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I just looked and we also use "update" to remove the finalizer (there is a todo to switch to patch when strategic merge supports removing an entry from a slice of a base type). I'll make the appropriate changes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this should be option on the config struct contained in the controller context. It's logically config information even if its never exposed via flags. You can set the default where its created.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@ncdc
Copy link
Copy Markdown
Member Author

ncdc commented May 23, 2017

@deads2k updated

@deads2k
Copy link
Copy Markdown
Contributor

deads2k commented May 23, 2017 via email

@ncdc
Copy link
Copy Markdown
Member Author

ncdc commented May 23, 2017

You'll need to define a serializeable GroupResource, but yes.

What do you mean / when / where?

@deads2k
Copy link
Copy Markdown
Contributor

deads2k commented May 23, 2017

What do you mean / when / where?

Down inside KubeControllerManagerConfiguration

@ncdc
Copy link
Copy Markdown
Member Author

ncdc commented May 23, 2017

I didn't make it part of KubeControllerManagerConfiguration. I made it part of the CMServer struct.

@ncdc
Copy link
Copy Markdown
Member Author

ncdc commented May 23, 2017

@deads2k if it needs to be in KubeControllerManagerConfiguration, how do you propose making a GVR serializable?

@k8s-github-robot k8s-github-robot added the kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API label May 23, 2017
@ncdc
Copy link
Copy Markdown
Member Author

ncdc commented May 23, 2017

Updated, now with GCIgnoredResources living in the KubeControllerManagerConfiguration componentconfig struct.

@deads2k
Copy link
Copy Markdown
Contributor

deads2k commented May 23, 2017

lgtm

please squash before merge.

ncdc added 2 commits May 23, 2017 12:00
The garbage collector controller currently needs to list, watch, get,
patch, update, and delete resources. Update the criteria for
deletable resources to reflect this.
Allow the list of resources the garbage collector controller should
ignore to be customizable, so downstream integrators can add their own
resources to the list, if necessary.
@ncdc ncdc force-pushed the gc-require-list-watch branch from 99d91a5 to d1a0384 Compare May 23, 2017 16:08
@ncdc
Copy link
Copy Markdown
Member Author

ncdc commented May 23, 2017

Squashed

@ncdc ncdc changed the title GC: ignore resources that don't support list/watch, allow list of ignored resources to be customized GC: update required verbs for deletable resources, allow list of ignored resources to be customized May 23, 2017
@caesarxuchao
Copy link
Copy Markdown
Contributor

lgtm

@ncdc
Copy link
Copy Markdown
Member Author

ncdc commented May 23, 2017

@k8s-bot pull-kubernetes-kubemark-e2e-gce test this

@ncdc
Copy link
Copy Markdown
Member Author

ncdc commented May 23, 2017

@k8s-bot pull-kubernetes-e2e-gce-etcd3 test this (took too long to delete some namespaces).

@deads2k
Copy link
Copy Markdown
Contributor

deads2k commented May 23, 2017

/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 23, 2017
@smarterclayton
Copy link
Copy Markdown
Contributor

/approve

based on reviewers signing off

@k8s-github-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, ncdc, smarterclayton

Details Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 23, 2017
@k8s-github-robot
Copy link
Copy Markdown

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link
Copy Markdown

Automatic merge from submit-queue (batch tested with PRs 46149, 45897, 46293, 46296, 46194)

@k8s-github-robot k8s-github-robot merged commit 45b275d into kubernetes:master May 23, 2017
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

k8s-ci-robot commented May 23, 2017

@ncdc: The following test(s) failed:

Test name Commit Details Rerun command
pull-kubernetes-e2e-kops-aws d1a0384 link @k8s-bot pull-kubernetes-e2e-kops-aws test this

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

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. I understand the commands that are listed here.

@ncdc ncdc deleted the gc-require-list-watch branch October 22, 2018 15:30
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/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants