Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct {
// Namespace is the namespace that the user has requested with the
// "--namespace" / "-n" flag. Defaults to "default" if the flag was not
// provided.
Namespace string
// EnforceNamespace will be true if the user provided the namespace flag.
EnforceNamespace bool
// RESTConfig is a Kubernetes REST config that contains the user's
// authentication and access configuration.
RESTConfig *rest.Config
// CMClient is a Kubernetes clientset for interacting with cert-manager APIs.
CMClient cmclient.Interface
// KubeClient is a Kubernetes clientset for interacting with the base
// Kubernetes APIs.
KubeClient kubernetes.Interface
}
Factory provides a set of clients and configurations to authenticate and access a target Kubernetes cluster. Factory will ensure that its fields are populated and valid during command execution.
func New ¶
New returns a new Factory. The supplied command will have flags registered for interacting with the Kubernetes access options. Factory will be populated when the command is executed using the cobra PreRun. If a PreRun is already defined, it will be executed _after_ Factory has been populated, making it available.
Click to show internal directories.
Click to hide internal directories.