serviceaccount

package
v3.10.0-0.31.0+incompa... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

serviceaccount is copied from k8s.io/kubernetes/pkg/serviceaccount to avoid an API dependency on k8s.io/kubernetes outside of the api types we rely upon. The contents of the package can't change without breaking lots of authentication and authorization. Using an internal package prevents leaks. Do not add more things here or modify values.

Index

Constants

View Source
const (
	ServiceAccountUsernamePrefix    = "system:serviceaccount:"
	ServiceAccountUsernameSeparator = ":"
	ServiceAccountGroupPrefix       = "system:serviceaccounts:"
	AllServiceAccountsGroup         = "system:serviceaccounts"
)

Variables

This section is empty.

Functions

func MakeGroupNames

func MakeGroupNames(namespace, name string) []string

MakeGroupNames generates service account group names for the given namespace and ServiceAccount name

func MakeNamespaceGroupName

func MakeNamespaceGroupName(namespace string) string

MakeNamespaceGroupName returns the name of the group all service accounts in the namespace are included in

func MakeUsername

func MakeUsername(namespace, name string) string

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 SplitUsername

func SplitUsername(username string) (string, string, error)

SplitUsername returns the namespace and ServiceAccount name embedded in the given username, or an error if the username is not a valid name produced by MakeUsername

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL