Documentation ¶
Index ¶
Constants ¶
View Source
const ( ServiceAccountUsernamePrefix = "system:serviceaccount:" ServiceAccountUsernameSeparator = ":" ServiceAccountGroupPrefix = "system:serviceaccounts:" AllServiceAccountsGroup = "system:serviceaccounts" )
Variables ¶
This section is empty.
Functions ¶
func MakeGroupNames ¶
MakeGroupNames generates service account group names for the given namespace
func MakeNamespaceGroupName ¶
MakeNamespaceGroupName returns the name of the group all service accounts in the namespace are included in
func MakeUsername ¶
MakeUsername generates a username from the given namespace and ServiceAccount name. The resulting username can be passed to SplitUsername to extract the original namespace and ServiceAccount name.
func MatchesUsername ¶
MatchesUsername checks whether the provided username matches the namespace and name without allocating. Use this when checking a service account namespace and name against a known string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.