Documentation ¶
Index ¶
- func CleanupObjectsFromCSRAccess(ctx context.Context, targetClient kubernetes.Interface) error
- func CleanupObjectsFromDynamicServiceAccountTokenAccess(ctx context.Context, targetClient kubernetes.Interface) error
- func CleanupObjectsFromStaticServiceAccountTokenAccess(ctx context.Context, shootClient kubernetes.Interface) error
- func CreateShootClientFromAdminKubeconfig(ctx context.Context, gardenClient kubernetes.Interface, ...) (kubernetes.Interface, error)
- func CreateShootClientFromStaticServiceAccountToken(ctx context.Context, shootClient kubernetes.Interface, name string) (kubernetes.Interface, error)
- func CreateShootClientFromStaticTokenKubeconfig(ctx context.Context, gardenClient kubernetes.Interface, ...) (kubernetes.Interface, error)
- func CreateShootClientFromViewerKubeconfig(ctx context.Context, gardenClient kubernetes.Interface, ...) (kubernetes.Interface, error)
- func CreateTargetClientFromCSR(ctx context.Context, targetClient kubernetes.Interface, commonName string) (kubernetes.Interface, error)
- func CreateTargetClientFromDynamicServiceAccountToken(ctx context.Context, targetClient kubernetes.Interface, name string) (kubernetes.Interface, error)
- func RequestAdminKubeconfigForShoot(ctx context.Context, gardenClient kubernetes.Interface, ...) ([]byte, error)
- func RequestViewerKubeconfigForShoot(ctx context.Context, gardenClient kubernetes.Interface, ...) ([]byte, error)
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 CreateShootClientFromViewerKubeconfig ¶ added in v1.86.0
func CreateShootClientFromViewerKubeconfig(ctx context.Context, gardenClient kubernetes.Interface, shoot *gardencorev1beta1.Shoot) (kubernetes.Interface, error)
CreateShootClientFromViewerKubeconfig requests a viewer kubeconfig 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.
func RequestViewerKubeconfigForShoot ¶ added in v1.86.0
func RequestViewerKubeconfigForShoot(ctx context.Context, gardenClient kubernetes.Interface, shoot *gardencorev1beta1.Shoot, expirationSeconds *int64) ([]byte, error)
RequestViewerKubeconfigForShoot requests an viewer kubeconfig for the given shoot.
Types ¶
This section is empty.