Commit 2fd4f883 authored by Zhou Peng's avatar Zhou Peng

[pkg/controller/serviceaccount]: refactor to more idiomatic go

Signed-off-by: 's avatarZhou Peng <p@ctriple.cn>
parent 8211cabf
......@@ -199,8 +199,7 @@ func (c *ServiceAccountsController) syncNamespace(key string) error {
}
createFailures := []error{}
for i := range c.serviceAccountsToEnsure {
sa := c.serviceAccountsToEnsure[i]
for _, sa := range c.serviceAccountsToEnsure {
switch _, err := c.saLister.ServiceAccounts(ns.Name).Get(sa.Name); {
case err == nil:
continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment