Documentation
¶
Index ¶
- Variables
- func BootstrapTokenSecretName(tokenID string) string
- func GenerateBootstrapToken() (string, error)
- func IsValidBootstrapToken(token string) bool
- func IsValidBootstrapTokenID(tokenID string) bool
- func TokenFromIDAndSecret(id, secret string) string
- func ValidateBootstrapGroupName(name string) error
- func ValidateUsages(usages []string) error
Constants ¶
This section is empty.
Variables ¶
var ( // BootstrapTokenRegexp is a compiled regular expression of TokenRegexpString BootstrapTokenRegexp = regexp.MustCompile(api.BootstrapTokenPattern) // BootstrapTokenIDRegexp is a compiled regular expression of TokenIDRegexpString BootstrapTokenIDRegexp = regexp.MustCompile(api.BootstrapTokenIDPattern) // BootstrapGroupRegexp is a compiled regular expression of BootstrapGroupPattern BootstrapGroupRegexp = regexp.MustCompile(api.BootstrapGroupPattern) )
Functions ¶
func BootstrapTokenSecretName ¶ added in v1.11.7
BootstrapTokenSecretName returns the expected name for the Secret storing the Bootstrap Token in the Kubernetes API.
func GenerateBootstrapToken ¶ added in v1.11.7
GenerateBootstrapToken generates a new, random Bootstrap Token.
func IsValidBootstrapToken ¶ added in v1.11.7
IsValidBootstrapToken returns whether the given string is valid as a Bootstrap Token and in other words satisfies the BootstrapTokenRegexp
func IsValidBootstrapTokenID ¶ added in v1.11.7
IsValidBootstrapTokenID returns whether the given string is valid as a Bootstrap Token ID and in other words satisfies the BootstrapTokenIDRegexp
func TokenFromIDAndSecret ¶ added in v1.11.7
TokenFromIDAndSecret returns the full token which is of the form "{id}.{secret}"
func ValidateBootstrapGroupName ¶
ValidateBootstrapGroupName checks if the provided group name is a valid bootstrap group name. Returns nil if valid or a validation error if invalid.
func ValidateUsages ¶
ValidateUsages validates that the passed in string are valid usage strings for bootstrap tokens.
Types ¶
This section is empty.