metadata

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Deployment  = reflect.TypeOf(appsv1.Deployment{}).Name()
	DaemonSet   = reflect.TypeOf(appsv1.DaemonSet{}).Name()
	StatefulSet = reflect.TypeOf(appsv1.StatefulSet{}).Name()
	ReplicaSet  = reflect.TypeOf(appsv1.ReplicaSet{}).Name()
	Job         = reflect.TypeOf(batchv1.Job{}).Name()
	CronJob     = reflect.TypeOf(batchv1Beta.CronJob{}).Name()
	Pod         = reflect.TypeOf(corev1.Pod{}).Name()
)

Functions

This section is empty.

Types

type LabelExtractor

type LabelExtractor struct{}

func (*LabelExtractor) GetLabelsFromWorkload

func (l *LabelExtractor) GetLabelsFromWorkload(req *admissionv1.AdmissionRequest) (map[string]string, bool, error)

type UserGroupAnnotationHandler

type UserGroupAnnotationHandler struct {
	// contains filtered or unexported fields
}

func (*UserGroupAnnotationHandler) GetAnnotationsFromRequestKind

func (u *UserGroupAnnotationHandler) GetAnnotationsFromRequestKind(req *admissionv1.AdmissionRequest) (map[string]string, bool, error)

func (*UserGroupAnnotationHandler) GetPatchForPod

func (u *UserGroupAnnotationHandler) GetPatchForPod(annotations map[string]string, user string, groups []string) (*common.PatchOperation, error)

func (*UserGroupAnnotationHandler) GetPatchForWorkload

func (u *UserGroupAnnotationHandler) GetPatchForWorkload(req *admissionv1.AdmissionRequest, user string, groups []string) ([]common.PatchOperation, error)

func (*UserGroupAnnotationHandler) IsAnnotationAllowed

func (u *UserGroupAnnotationHandler) IsAnnotationAllowed(userName string, groups []string) bool

func (*UserGroupAnnotationHandler) IsAnnotationValid

func (u *UserGroupAnnotationHandler) IsAnnotationValid(userInfoAnnotation string) error

Jump to

Keyboard shortcuts

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