kubernetesk8s.io/kubernetes/test/integration/authutil Index | Files

package authutil

import "k8s.io/kubernetes/test/integration/authutil"

Index

Functions

func GrantServiceAccountAuthorization

func GrantServiceAccountAuthorization(t *testing.T, ctx context.Context, adminClient clientset.Interface, serviceAccountName, serviceAccountNamespace string, rule rbacv1.PolicyRule)

func GrantUserAuthorization

func GrantUserAuthorization(t *testing.T, ctx context.Context, adminClient clientset.Interface, username string, rule rbacv1.PolicyRule)

func ServiceAccountClient

func ServiceAccountClient(namespace, name string) clientFn

func WaitForNamedAuthorizationUpdate

func WaitForNamedAuthorizationUpdate(t *testing.T, ctx context.Context, c authorizationv1client.SubjectAccessReviewsGetter, user, namespace, verb, resourceName string, resource schema.GroupResource, allowed bool)

WaitForNamedAuthorizationUpdate checks if the given user can perform the named verb and action on the named resource. Copied from k8s.io/kubernetes/test/e2e/framework/auth.

Source Files

authutil.go

Version
v1.33.0 (latest)
Published
Apr 23, 2025
Platform
linux/amd64
Imports
14 packages
Last checked
3 hours ago

Tools for package owners.