From 5e9a21456ec3a3922f78c287e284aafd9bb3f91a Mon Sep 17 00:00:00 2001 From: Sergey Dudoladov Date: Thu, 15 Feb 2018 16:33:53 +0100 Subject: [PATCH] Remove the incorrect service account check --- pkg/controller/controller.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index 2abc4a6c6..3b63b068b 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -131,11 +131,6 @@ func (c *Controller) initController() { c.logger.Infof("config: %s", c.opConfig.MustMarshal()) - c.checkOperatorServiceAccount(c.config.Namespace) - if c.config.Namespace != c.opConfig.WatchedNamespace { - c.checkOperatorServiceAccount(c.opConfig.WatchedNamespace) - } - if c.opConfig.DebugLogging { c.logger.Logger.Level = logrus.DebugLevel } @@ -261,11 +256,3 @@ func (c *Controller) kubeNodesInformer(stopCh <-chan struct{}, wg *sync.WaitGrou c.nodesInformer.Run(stopCh) } - -// Check that a namespace has the service account that the operator needs -func (c *Controller) checkOperatorServiceAccount(namespace string) { - _, err := c.KubeClient.ServiceAccounts(namespace).Get(c.opConfig.ServiceAccountName, metav1.GetOptions{}) - if err != nil { - c.logger.Warnf("Cannot find the '%v' service account needed for operator in the namespace %q. Pods will not be able to start. Error: %v", c.opConfig.ServiceAccountName, namespace, err) - } -}