access

package
v1.72.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 25 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupObjectsFromCSRAccess

func CleanupObjectsFromCSRAccess(ctx context.Context, targetClient kubernetes.Interface) error

CleanupObjectsFromCSRAccess cleans up all objects in the target created by all calls to CreateTargetClientFromCSR.

func CleanupObjectsFromDynamicServiceAccountTokenAccess

func CleanupObjectsFromDynamicServiceAccountTokenAccess(ctx context.Context, targetClient kubernetes.Interface) error

CleanupObjectsFromDynamicServiceAccountTokenAccess cleans up all objects in the target created by all calls to CreateTargetClientFromDynamicServiceAccountToken.

func CleanupObjectsFromStaticServiceAccountTokenAccess

func CleanupObjectsFromStaticServiceAccountTokenAccess(ctx context.Context, shootClient kubernetes.Interface) error

CleanupObjectsFromStaticServiceAccountTokenAccess cleans up all objects in the shoot created by all calls to CreateShootClientFromStaticServiceAccountToken.

func CreateShootClientFromAdminKubeconfig

func CreateShootClientFromAdminKubeconfig(ctx context.Context, gardenClient kubernetes.Interface, shoot *gardencorev1beta1.Shoot) (kubernetes.Interface, error)

CreateShootClientFromAdminKubeconfig requests an admin kubeconfig and creates a shoot client.

func CreateShootClientFromStaticServiceAccountToken

func CreateShootClientFromStaticServiceAccountToken(ctx context.Context, shootClient kubernetes.Interface, name string) (kubernetes.Interface, error)

CreateShootClientFromStaticServiceAccountToken creates a ServiceAccount, a corresponding static token secret (issued by kube-controller-manager), and then creates a new shoot client from it. You should call CleanupObjectsFromStaticServiceAccountTokenAccess to clean up the objects created by this function.

func CreateShootClientFromStaticTokenKubeconfig

func CreateShootClientFromStaticTokenKubeconfig(ctx context.Context, gardenClient kubernetes.Interface, shoot *gardencorev1beta1.Shoot) (kubernetes.Interface, error)

CreateShootClientFromStaticTokenKubeconfig retrieves the static token kubeconfig secret and creates a shoot client.

func CreateTargetClientFromCSR

func CreateTargetClientFromCSR(ctx context.Context, targetClient kubernetes.Interface, commonName string) (kubernetes.Interface, error)

CreateTargetClientFromCSR creates and approves a CSR in the shoot and creates a new target client from it. You should call CleanupObjectsFromCSRAccess to clean up the objects created by this function.

func CreateTargetClientFromDynamicServiceAccountToken

func CreateTargetClientFromDynamicServiceAccountToken(ctx context.Context, targetClient kubernetes.Interface, name string) (kubernetes.Interface, error)

CreateTargetClientFromDynamicServiceAccountToken creates a ServiceAccount, uses the kube-apiserver's TokenRequest API to request a token for it, and then creates a new target client from it. You should call CleanupObjectsFromDynamicServiceAccountTokenAccess to clean up the objects created by this function.

func RequestAdminKubeconfigForShoot

func RequestAdminKubeconfigForShoot(ctx context.Context, gardenClient kubernetes.Interface, shoot *gardencorev1beta1.Shoot, expirationSeconds *int64) ([]byte, error)

RequestAdminKubeconfigForShoot requests an admin kubeconfig for the given shoot.

Types

This section is empty.

Jump to

Keyboard shortcuts

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