kube

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package kube builds the Kubernetes clients khook uses: a dynamic client for arbitrary manifests, a typed clientset for well-known operations, and a shortcut-expanding RESTMapper for resolving resource arguments like "pods" or "daemonset/aws-node".

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clients

type Clients struct {
	Dynamic dynamic.Interface
	Typed   kubernetes.Interface
	Mapper  meta.RESTMapper
	// contains filtered or unexported fields
}

Clients bundles everything the executors need to talk to one cluster.

func New

func New(kubeconfig, kubecontext string) (*Clients, error)

New builds clients from a kubeconfig path and context name; empty values fall back to the standard loading rules (KUBECONFIG, ~/.kube/config).

func (*Clients) HelmGetter

func (c *Clients) HelmGetter(namespace string) genericclioptions.RESTClientGetter

HelmGetter returns a RESTClientGetter for the Helm SDK, scoped to a namespace.

func (*Clients) ResolveResourceArg

func (c *Clients) ResolveResourceArg(arg string) (*ResolvedResource, error)

ResolveResourceArg maps a type argument ("pods", "po", "daemonset", "deployments.apps") to a GVR plus scope using the shortcut-expanding mapper.

type ResolvedResource

type ResolvedResource struct {
	GVR        schema.GroupVersionResource
	Namespaced bool
}

ResolvedResource is a resource argument mapped to something addressable.

Jump to

Keyboard shortcuts

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