driver deployer: Don't clean up deployment upon exit
We don't want to teardown the CSI driver deployment if a node was shutting down
or the deployer deployment scaled back.
Leave the deployment for uninstall process for now.
@@ -3,7 +3,6 @@ package app
import (
"fmt"
"os"
- "sync"
"github.com/Sirupsen/logrus"
"github.com/pkg/errors"
@@ -222,20 +221,6 @@ func deployCSIDriver(kubeClient *clientset.Clientset, c *cli.Context, managerIma
logrus.Debug("CSI deployment done")
- defer func() {
- var wg sync.WaitGroup
- util.RunAsync(&wg, func() {
- attacherDeployment.Cleanup(kubeClient)
- })
- util.RunAsync(&wg, func() {
- provisionerDeployment.Cleanup(kubeClient)
- })
- util.RunAsync(&wg, func() {
- pluginDeployment.Cleanup(kubeClient)
- })
- wg.Wait()
- }()
-
done := make(chan struct{})
util.RegisterShutdownChannel(done)
