util

package
v0.0.0-...-62570a8 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

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

func ValidateNamespace(namespace *corev1.Namespace) bool

check if namespace exist and NamespacePhase is non terminating

Types

This section is empty.

Jump to

Keyboard shortcuts

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