-
Notifications
You must be signed in to change notification settings - Fork 113
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
Adding webhook 'delete' command to remove non-namespaced objects #791
Adding webhook 'delete' command to remove non-namespaced objects #791
Conversation
Thanks for your PR,
To skip the vendors CIs, Maintainers can use one of:
|
deployment/sriov-network-operator-chart/templates/pre-delete-webooks.yaml
Outdated
Show resolved
Hide resolved
6877210
to
663ad6b
Compare
663ad6b
to
450514e
Compare
Pull Request Test Coverage Report for Build 11577275447Details
💛 - Coveralls |
deployment/sriov-network-operator-chart/templates/pre-delete-webooks.yaml
Outdated
Show resolved
Hide resolved
deployment/sriov-network-operator-chart/templates/pre-delete-webooks.yaml
Show resolved
Hide resolved
52d9671
to
693e48d
Compare
693e48d
to
bd8a6fc
Compare
/test-all |
deployment/sriov-network-operator-chart/templates/pre-delete-webooks.yaml
Outdated
Show resolved
Hide resolved
13b3cda
to
e2440c4
Compare
e2440c4
to
a7f10f2
Compare
deployment/sriov-network-operator-chart/templates/pre-delete-webooks.yaml
Show resolved
Hide resolved
2ee6dad
to
56a8346
Compare
/test-all |
ec25c78
to
798f5e7
Compare
798f5e7
to
797755e
Compare
|
||
// watching 'default' config deletion with context timeout, in case sriov-operator fails to delete 'default' config | ||
watcher, err := sriovcs.SriovOperatorConfigs(namespace).Watch(ctx, metav1.ListOptions{Watch: true}) | ||
defer watcher.Stop() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if err is not nil, is it safe to stop the watcher ? or should the defer be moved after the error check ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall LGTM, need CI to be green.
added one last comment from my side , thx for the patience ! :)
before we merge please re-work the commits so they do not reflect the review interations but rather the changes done.
e.g
commit 1 : add finalizer to sriovoperatorconfig
commit 2: cleanup binary related changes
78f11fa
to
7c3a348
Compare
7c3a348
to
2886ba3
Compare
…level objects cleanup Signed-off-by: Ido Heyvi <[email protected]>
…install pre-delete hook Signed-off-by: Ido Heyvi <[email protected]>
2886ba3
to
b1bb044
Compare
@zeeke could you please add your approval for this PR? |
sriov-network-operator dynamically creates
validating/mutating/clusterroles/clusterrolebinding
cluster objects, for specifiedSriovOperatorConfig
. These objects are not being cleaned once sriov operator is uninstalled (via Helm/Openshift).The proposed PR is to use a small go binary within Helm pre-delete hook. This binary will delete
default
SriovOperatorConfig, assuming added SriovOperatorConfig finalizer will make sure sriov controller is deleting all generated cluster level objects (e.g. webhooks), prior to operator deployment object is removed by Helm