Remove the incorrect service account check
This commit is contained in:
parent
44a2812f5a
commit
5e9a21456e
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue