Documentation
¶
Overview ¶
Package connection builds authenticated Kubernetes client configurations from CLI flags, supporting kubeconfig, direct API server, and in-cluster modes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildConfig ¶
BuildConfig assembles a rest.Config from opts, choosing in-cluster, direct, or kubeconfig-based auth.
func NewClientset ¶
NewClientset builds a Kubernetes clientset and the underlying rest.Config from opts.
func NewDynamicClient ¶
NewDynamicClient builds a dynamic client for listing CRD-backed resources (Kyverno policies, Gatekeeper constraint templates) that aren't part of the typed kubernetes.Interface. Shares the rest.Config built by BuildConfig so auth and timeout knobs flow through unchanged.
Types ¶
type Options ¶
type Options struct {
Kubeconfig string
Context string
APIServer string
Token string
TokenFile string
CAFile string
ClientCertificateFile string
ClientKeyFile string
InsecureSkipTLSVerify bool
InCluster bool
Timeout time.Duration
}
Options captures the connection-related CLI flags used to build a rest.Config.