validation

package
v1.30.7 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 145

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateClusterRoleBinding

func ValidateClusterRoleBinding(roleBinding *rbac.ClusterRoleBinding) field.ErrorList

func ValidateClusterRoleBindingUpdate

func ValidateClusterRoleBindingUpdate(roleBinding *rbac.ClusterRoleBinding, oldRoleBinding *rbac.ClusterRoleBinding) field.ErrorList

func ValidateClusterRoleUpdate

func ValidateClusterRoleUpdate(role *rbac.ClusterRole, oldRole *rbac.ClusterRole, opts ClusterRoleValidationOptions) field.ErrorList

func ValidatePolicyRule added in v1.11.0

func ValidatePolicyRule(rule rbac.PolicyRule, isNamespaced bool, fldPath *field.Path) field.ErrorList

ValidatePolicyRule is exported to allow types outside of the RBAC API group to embed a rbac.PolicyRule and reuse this validation logic

func ValidateRBACName added in v1.11.0

func ValidateRBACName(name string, prefix bool) []string

ValidateRBACName is exported to allow types outside of the RBAC API group to reuse this validation logic Minimal validation of names for roles and bindings. Identical to the validation for Openshift. See: * https://github.com/kubernetes/kubernetes/blob/60db507b279ce45bd16ea3db49bf181f2aeb3c3d/pkg/api/validation/name.go * https://github.com/openshift/origin/blob/388478c40e751c4295dcb9a44dd69e5ac65d0e3b/pkg/api/helpers.go

func ValidateRole

func ValidateRole(role *rbac.Role) field.ErrorList

func ValidateRoleBinding

func ValidateRoleBinding(roleBinding *rbac.RoleBinding) field.ErrorList

func ValidateRoleBindingSubject added in v1.11.0

func ValidateRoleBindingSubject(subject rbac.Subject, isNamespaced bool, fldPath *field.Path) field.ErrorList

ValidateRoleBindingSubject is exported to allow types outside of the RBAC API group to embed a rbac.Subject and reuse this validation logic

func ValidateRoleBindingUpdate

func ValidateRoleBindingUpdate(roleBinding *rbac.RoleBinding, oldRoleBinding *rbac.RoleBinding) field.ErrorList

func ValidateRoleUpdate

func ValidateRoleUpdate(role *rbac.Role, oldRole *rbac.Role) field.ErrorList

Types

type ClusterRoleValidationOptions added in v1.26.0

type ClusterRoleValidationOptions struct {
	AllowInvalidLabelValueInSelector bool
}

Jump to

Keyboard shortcuts

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