Documentation
¶
Index ¶
- func BuildClientCmd(kubeconfig, context string, ...) clientcmd.ClientConfig
- func BuildClientConfig(kubeconfig, context string) (*rest.Config, error)
- func DefaultRestConfig(kubeconfig, context string, fns ...func(config *rest.Config)) (*rest.Config, error)
- func NewClientConfigForRestConfig(restConfig *rest.Config) clientcmd.ClientConfig
- func SetRestDefaults(config *rest.Config) *rest.Config
- type CLIClient
- type Client
- type ClientOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildClientCmd ¶
func BuildClientCmd(kubeconfig, context string, overrides ...func(configOverrides *clientcmd.ConfigOverrides)) clientcmd.ClientConfig
BuildClientCmd builds a client cmd config from a kubeconfig filepath and context. It overrides the current context with the one provided (empty to use default).
This is a modified version of k8s.io/client-go/tools/clientcmd/BuildConfigFromFlags with the difference that it loads default configs if not running in-cluster.
func BuildClientConfig ¶
BuildClientConfig builds a client rest config from a kubeconfig filepath and context. It overrides the current context with the one provided (empty to use default).
This is a modified version of k8s.io/client-go/tools/clientcmd/BuildConfigFromFlags with the difference that it loads default configs if not running in-cluster.
func DefaultRestConfig ¶
func DefaultRestConfig(kubeconfig, context string, fns ...func(config *rest.Config)) (*rest.Config, error)
DefaultRestConfig returns the rest.Config for the given kube config file and context.
func NewClientConfigForRestConfig ¶
func NewClientConfigForRestConfig(restConfig *rest.Config) clientcmd.ClientConfig
Types ¶
type CLIClient ¶
type CLIClient interface {
Client
DynamicClientFor(gvk schema.GroupVersionKind, obj *unstructured.Unstructured, namespace string) (dynamic.ResourceInterface, error)
}
func NewCLIClient ¶
func NewCLIClient(clientCfg clientcmd.ClientConfig, opts ...ClientOption) (CLIClient, error)
type Client ¶
type Client interface {
// Ext returns the API extensions client.
Ext() kubeExtClient.Interface
// Kube returns the core kube client
Kube() kubernetes.Interface
}
type ClientOption ¶
func WithRevision ¶
func WithRevision(revision string) ClientOption
Directories
¶
| Path | Synopsis |
|---|---|
|
Package informerfactory provides a "factory" to generate informers.
|
Package informerfactory provides a "factory" to generate informers. |