k8s

package
v0.4.0-dev2 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AvailableRoles = []K8sRole{
	DefaultRole,
	AdminRole,
	OnCallRole,
}

A list of all existing cluster roles.

Functions

func GetNamespaceName

func GetNamespaceName(any string) (string, error)

GetNamespaceName returns a sanitized version of the input string which is allowed to be used as a kubernetes namespace.

func NewClient

func NewClient() (client.Client, error)

NewClient creates a new kubernetes.Clientset using the in-cluster config with a fallback to the local kubeconfig.

func ValidateRole

func ValidateRole(role string) error

Types

type K8sRole

type K8sRole string

K8sRole is the name of a user's K8s role.

const (
	// User role
	DefaultRole K8sRole = "default"
	// Admin role
	AdminRole K8sRole = "admin"
	// OnCaller role
	OnCallRole K8sRole = "oncall"
)

K8s Roles

Jump to

Keyboard shortcuts

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