Remove the incorrect service account check

This commit is contained in:
Sergey Dudoladov 2018-02-15 16:33:53 +01:00
parent 44a2812f5a
commit 5e9a21456e
1 changed files with 0 additions and 13 deletions

View File

@ -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)
}
}