k8s

package
v0.0.0-...-6243be3 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOrUpdate

func CreateOrUpdate(ctx context.Context, c client.Client, obj client.Object) error

CreateOrUpdate attempts to update an existing Kubernetes object, or creates it if it doesn't exist. This implements an "upsert" operation for Kubernetes resources.

func GetClusterKubeConfigFromSecret

func GetClusterKubeConfigFromSecret(ctx context.Context, hubClient client.Client, clusterName string) ([]byte, error)

GetClusterKubeConfigFromSecret retrieves the cluster kubeconfig from a secret

func GetSchemeForCluster

func GetSchemeForCluster() *runtime.Scheme

GetSchemeForCluster returns the scheme for the managed cluster client

func GetSchemeForHub

func GetSchemeForHub() *runtime.Scheme

GetSchemeForHub returns the scheme for the hub cluster client

func NewClientForCluster

func NewClientForCluster(ctx context.Context, hubClient client.Client, clusterName string) (client.Client, error)

NewClientForCluster creates a new client for a managed cluster

func NewClientForHub

func NewClientForHub() (client.WithWatch, error)

NewClientForHub creates a new client for the hub cluster

Types

This section is empty.

Jump to

Keyboard shortcuts

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