-
Notifications
You must be signed in to change notification settings - Fork 111
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 a pre-delete helm hook to clean up webhook configs #751
base: master
Are you sure you want to change the base?
Add a pre-delete helm hook to clean up webhook configs #751
Conversation
Thanks for your PR,
To skip the vendors CIs, Maintainers can use one of:
|
Signed-off-by: amaslennikov <amaslennikov@nvidia.com>
69a4ca6
to
aab1735
Compare
Mutating and Validating webhook configs are created programmatically and are not managed by helm. To clean them up on helm delete, adding a small pre-delete hook k8snetworkplumbingwg/sriov-network-operator#751 Signed-off-by: amaslennikov <amaslennikov@nvidia.com>
Pull Request Test Coverage Report for Build 10144409112Details
💛 - Coveralls |
serviceAccountName: {{ include "sriov-network-operator.fullname" . }} | ||
containers: | ||
- name: cleanup | ||
image: bitnami/kubectl:latest |
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. i wonder if we should go with that or implement small "cleanup" binary which will do these operations using client-go lib. having this binary part of the sriov-network-operator image.
@ykulazhenkov @SchSeba @zeeke @Eoghan1232 thoughts ?
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.
as a quick workaround, I think approach is probably fine.
but if there is a need to clean up additional resources through something like this, then a binary called from client-go lib would be a better approach probably so that way operator has control.....
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.
two points here:
- yes we need a binary inside our image. use-case disconnected environments where the user needs to clone images and we have variables in helm to allow him specify the images for the operator. this one is static.
- add a step in the run CI for k8s to test this
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: "{{ include "sriov-network-operator.fullname" . }}-post-delete-hook" |
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.
Why the name is -post-delete-hook
? The hook is pre-delete
Mutating and Validating webhook configs are created programmatically and are not managed by helm. To clean them up on helm delete, adding a small pre-delete hook