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 ¶
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.