Skip to content

Commit 76c0fdc

Browse files
author
Xin Li
authored
Set ibm-namespace-scope-operator sa as default (#33)
1 parent 82442f9 commit 76c0fdc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

controllers/namespacescope_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,14 +304,14 @@ func (r *NamespaceScopeReconciler) GetServiceAccountFromNamespace(labels map[str
304304
return nil, err
305305
}
306306

307-
var saNames []string
307+
// By default, set ibm-namespace-scope-operator service account
308+
var saNames = []string{"ibm-namespace-scope-operator"}
308309

309310
for _, pod := range pods.Items {
310311
if len(pod.Spec.ServiceAccountName) != 0 {
311312
saNames = append(saNames, pod.Spec.ServiceAccountName)
312313
}
313314
}
314-
315315
saNames = util.ToStringSlice(util.MakeSet(saNames))
316316

317317
return saNames, nil

0 commit comments

Comments
 (0)