Skip to content

Commit

Permalink
Cleanup multus config file 00-multus.conf when deleting daemonset
Browse files Browse the repository at this point in the history
When multus daemonset is deleted the auto generated config file
00-multus.conf is left, when new pod created and uses that conf
cni file, it will fail because multus roles are removed

This patch cleanup multus conf file 00-multus to allow using previous
primary cni config file

Signed-off-by: Mamduh Alassi <mamduhala@mellanox.com>
  • Loading branch information
Mmduh-483 committed Dec 14, 2020
1 parent 24386ab commit 9efbe55
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions images/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,11 @@ generateMultusConf

# ---------------------- end Generate "00-multus.conf".

# remove "00-multus.conf" on close.
if [ "$MULTUS_CONF_FILE" == "auto" ]; then
trap "rm -f $CNI_CONF_DIR/00-multus.conf" EXIT
fi

# Enter either sleep loop, or watch loop...
if [ "$MULTUS_CLEANUP_CONFIG_ON_EXIT" == true ]; then
log "Entering watch loop..."
Expand Down

0 comments on commit 9efbe55

Please sign in to comment.