func cleanUp(ctx context.Context) error {
	log.Debugln("Allowing clean up", shutdownGracePeriod, "to finish.")
	log.Infoln("Cleaning up daemonsets and daemonset pods")
	daemonSets, err := getAllDaemonsets(ctx)
	if err != nil {
		return err
	}
	if len(daemonSets) > 0 {
		for _, ds := range daemonSets {
			log.Infoln("Removing rogue daemonset:", ds.Name)
			err := remove(ctx, ds.Name)
			if err != nil {
				return err
			}
		}
	}
	log.Infoln("Finished cleanup. No rogue daemonsets or daemonset pods exist")
	return nil
}
cleanUp triggers check clean up and waits for all rogue daemonsets to clear
package main
import (
	"context"
	"github.com/pkg/errors"
	log "github.com/sirupsen/logrus"
	appsv1 "k8s.io/api/apps/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)