Documentation
¶
Overview ¶
Package versioncmd contains version cmd
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchCrossplaneVersion ¶ added in v0.7.1
FetchCrossplaneVersion returns the Crossplane server version using the provided REST config. It mirrors the upstream github.com/crossplane/crossplane/v2/cmd/crank/version.FetchCrossplaneVersion but accepts a pre-built *rest.Config instead of calling ctrl.GetConfig, so callers can honor the user's kubeconfig context (e.g. --context) even when running inside a Kubernetes pod.
TODO: Remove this fork once an upstream variant that accepts *rest.Config is available. Tracked in https://github.com/crossplane-contrib/crossplane-diff/issues/285.
Types ¶
type Cmd ¶
type Cmd struct {
Client bool `` /* 127-byte string literal not displayed */
Context kubecfg.Context `help:"Kubernetes context to use (defaults to current context)." name:"context"`
// contains filtered or unexported fields
}
Cmd represents the version command.
func (*Cmd) BeforeApply ¶ added in v0.7.1
BeforeApply binds the Cmd pointer as the kubecfg.Provider so that providers resolved later (in Run) see the parsed --context value.
func (*Cmd) GetKubeContext ¶ added in v0.7.1
GetKubeContext implements kubecfg.Provider so the shared REST config provider (bound in main via kong.BindToProvider) can resolve a *rest.Config that honors the user's kubeconfig context.