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 multus conf on exit #1299

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

adrianchiris
Copy link
Contributor

@adrianchiris adrianchiris commented Jun 18, 2024

  • if cleanup-config-on-exit is set delete generated multus
    config file on exit.

  • add an option to skip watch for master cni config and kubeconfig
    as cleanup-config-on-exit with multus-conf-file=auto also triggered
    the watch for cases when deletion of multus config is desired but watch isnt

  • setup signal handling to allow config file cleanup on exit

@adrianchiris adrianchiris changed the title Cleanup multus conf Cleanup multus conf on exit Jun 18, 2024
@adrianchiris
Copy link
Contributor Author

This is a proposed alternative to : #1298

as we used to clean up multus conf file in preStop hook, however since the container no longer has shell we cannot run simple sh commands for cleanup.

@coveralls
Copy link

Coverage Status

coverage: 62.736% (-0.4%) from 63.116%
when pulling 4198a76 on adrianchiris:cleanup-multus-conf
into aff99fc on k8snetworkplumbingwg:master.

@coveralls
Copy link

Coverage Status

coverage: 62.667% (-0.4%) from 63.116%
when pulling 273c175 on adrianchiris:cleanup-multus-conf
into 41013e7 on k8snetworkplumbingwg:master.

this provides a simple way to handle incoming
os signas using context

Signed-off-by: adrianc <[email protected]>
- if cleanup-config-on-exit is set delete generated multus
  config file on exit.

- add an option to skip watch for master cni config and kubeconfig
  as cleanup-config-on-exit with multus-conf-file=auto also triggered
  the watch for cases when deletion of multus config is desired but watch isnt

- setup signal handling to allow config file cleanup on exit

Signed-off-by: adrianc <[email protected]>
@coveralls
Copy link

Coverage Status

coverage: 62.667% (-0.4%) from 63.116%
when pulling ecc67c7 on adrianchiris:cleanup-multus-conf
into 41013e7 on k8snetworkplumbingwg:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants