Documentation ¶
Index ¶
- func FindRbacCondition(conditions []managedv1alpha1.Condition, ...) *managedv1alpha1.Condition
- func GenerateSafeList(allowedRegex string, deniedRegex string, nsList *corev1.NamespaceList) []string
- func NewRoleBindingForClusterRole(clusterRoleName, subjectName, subjectNamespace, subjectKind, namespace string) *v1.RoleBinding
- func PopulateCrPermissionClusterRoleNames(subjectPermission *managedv1alpha1.SubjectPermission, ...) []string
- func UpdateCondition(conditions []managedv1alpha1.Condition, message string, ...) []managedv1alpha1.Condition
- func ValidateNamespace(namespace *corev1.Namespace) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindRbacCondition ¶
func FindRbacCondition(conditions []managedv1alpha1.Condition, conditionType managedv1alpha1.SubjectPermissionType) *managedv1alpha1.Condition
FindRbacCondition finds in the condition that has the specified condition type in the given list if none exists, then returns nil
func GenerateSafeList ¶
func GenerateSafeList(allowedRegex string, deniedRegex string, nsList *corev1.NamespaceList) []string
GenerateSafeList by 1st checking allow regex then check denied regex
func NewRoleBindingForClusterRole ¶
func NewRoleBindingForClusterRole(clusterRoleName, subjectName, subjectNamespace, subjectKind, namespace string) *v1.RoleBinding
NewRoleBindingForClusterRole creates and returns valid RoleBinding
func PopulateCrPermissionClusterRoleNames ¶
func PopulateCrPermissionClusterRoleNames(subjectPermission *managedv1alpha1.SubjectPermission, clusterRoleList *v1.ClusterRoleList) []string
PopulateCrPermissionClusterRoleNames to see if clusterRoleName exists in permission returns list of ClusterRoleNames in permissions that do not exist
func UpdateCondition ¶
func UpdateCondition(conditions []managedv1alpha1.Condition, message string, clusterRoleNames []string, status bool, state managedv1alpha1.SubjectPermissionState, conditionType managedv1alpha1.SubjectPermissionType) []managedv1alpha1.Condition
UpdateCondition of SubjectPermission
func ValidateNamespace ¶
check if namespace exist and NamespacePhase is non terminating
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.