Unverified Commit 0cea0675 authored by Kubernetes Prow Robot's avatar Kubernetes Prow Robot Committed by GitHub

Merge pull request #78159 from byteor/master

[pkg/controller/serviceaccount]: refactor to more idiomatic go
parents c6338cbb 2fd4f883
...@@ -199,8 +199,7 @@ func (c *ServiceAccountsController) syncNamespace(key string) error { ...@@ -199,8 +199,7 @@ func (c *ServiceAccountsController) syncNamespace(key string) error {
} }
createFailures := []error{} createFailures := []error{}
for i := range c.serviceAccountsToEnsure { for _, sa := range c.serviceAccountsToEnsure {
sa := c.serviceAccountsToEnsure[i]
switch _, err := c.saLister.ServiceAccounts(ns.Name).Get(sa.Name); { switch _, err := c.saLister.ServiceAccounts(ns.Name).Get(sa.Name); {
case err == nil: case err == nil:
continue 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