Documentation ¶
Index ¶
- Variables
- type LabelExtractor
- type UserGroupAnnotationHandler
- func (u *UserGroupAnnotationHandler) GetAnnotationsFromRequestKind(req *admissionv1.AdmissionRequest) (map[string]string, bool, error)
- func (u *UserGroupAnnotationHandler) GetPatchForPod(annotations map[string]string, user string, groups []string) (*common.PatchOperation, error)
- func (u *UserGroupAnnotationHandler) GetPatchForWorkload(req *admissionv1.AdmissionRequest, user string, groups []string) ([]common.PatchOperation, error)
- func (u *UserGroupAnnotationHandler) IsAnnotationAllowed(userName string, groups []string) bool
- func (u *UserGroupAnnotationHandler) IsAnnotationValid(userInfoAnnotation string) error
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 NewUserGroupAnnotationHandler ¶
func NewUserGroupAnnotationHandler(conf *conf.AdmissionControllerConf) *UserGroupAnnotationHandler
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
Click to show internal directories.
Click to hide internal directories.