Documentation
¶
Overview ¶
Package kubeconfig provides a thin wrapper over k8s.io/client-go/tools/clientcmd for registering kubeconfig/context/namespace CLI flags, replacing the k8s.io/cli-runtime/pkg/genericclioptions.ConfigFlags dependency.
Index ¶
Constants ¶
const MinWaitTimeout = time.Second
MinWaitTimeout is the shortest --timeout accepted when --wait is set. Smaller values recreate issue #409: the deadline fires before a useful status is available, the CLI prints a near-empty partial report, and --cleanup then tears the run down immediately.
1s covers both commands. certification is event-driven (Watch). workloadrun checks status once immediately and then every 5s, so a 1s timeout still observes the WorkloadRun at least once.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConfigFlags ¶
ConfigFlags holds pointers to kubeconfig, context, and namespace flag values. A nil pointer field is skipped when AddFlags is called, making that flag unavailable in the command — matching the genericclioptions.ConfigFlags idiom.
func NewConfigFlags ¶
func NewConfigFlags(_ bool) *ConfigFlags
NewConfigFlags returns a ConfigFlags with all fields initialised to empty (non-nil) string pointers. The usePersistentConfig parameter is accepted for drop-in compatibility with genericclioptions.NewConfigFlags but is unused.
func (*ConfigFlags) AddFlags ¶
func (f *ConfigFlags) AddFlags(fs *pflag.FlagSet)
AddFlags registers whichever flags have non-nil pointer fields onto fs.
func (*ConfigFlags) ToRESTConfig ¶
func (f *ConfigFlags) ToRESTConfig() (*rest.Config, error)
ToRESTConfig returns a *rest.Config built from the configured kubeconfig and context.
func (*ConfigFlags) ToRawKubeConfigLoader ¶
func (f *ConfigFlags) ToRawKubeConfigLoader() clientcmd.ClientConfig
ToRawKubeConfigLoader returns a clientcmd.ClientConfig for low-level access (e.g., reading raw context/cluster information).