Skip to content

Commit f46007f

Browse files
committed
fix
Signed-off-by: Sinelnikov Michail <mikhail.sinelnikov@flant.com>
1 parent 6e129ce commit f46007f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/linters/rbac/rules/placement.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,11 @@ func objectRBACPlacementServiceAccount(m *module.Module, object storage.StoreObj
165165
// not a single istiod instance, but several for different versions and can't use the shared ServiceAccount for them.
166166
return
167167
}
168+
if objectName != serviceAccountName && objectName != expectedServiceAccountName {
169+
errorList.Errorf("Name of ServiceAccount should be equal to %q or %q", serviceAccountName, expectedServiceAccountName)
170+
return
171+
}
168172

169-
errorList.Errorf("Name of ServiceAccount should be equal to %q or %q", serviceAccountName, expectedServiceAccountName)
170173
return
171174
}
172175

0 commit comments

Comments
 (0)