k8s

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllContexts

func GetAllContexts() ([]string, error)

func GetDefaultContextAndNamespace

func GetDefaultContextAndNamespace() (defaultContext string, defaultNamespace string)

func GetNamespaceForContext

func GetNamespaceForContext(context string) (namespace string, err error)

func GetNamespacesForContext

func GetNamespacesForContext(ctx context.Context, kubeCtx string) ([]string, error)

func InitScheme

func InitScheme(scheme *runtime.Scheme)

func SetupClientGo

func SetupClientGo(context string) (kubernetes.Interface, error)

Types

type Client

type Client struct {
	ctrl.Client
	CurrentNamespace string
}

func SetupControllerRuntimeClient

func SetupControllerRuntimeClient(overrides ...ClientOverride) *Client

type ClientOverride

type ClientOverride func(*clientcmd.ConfigOverrides)

func WithKubeContext

func WithKubeContext(kubeCtx string) ClientOverride

Jump to

Keyboard shortcuts

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