Documentation ¶
Index ¶
- Constants
- func GetConfig(c *Client) (*rest.Config, error)
- type Client
- func (c *Client) Clientset() (*kubernetes.Clientset, error)
- func (c *Client) Config() (config *rest.Config, err error)
- func (c *Client) ConfigForPath(kubeConfigPath string) (config *rest.Config, err error)
- func (c *Client) Dynamic() (dynamic.Interface, error)
- func (c *Client) GetConfigForPathOrDirect() (config *rest.Config, err error)
- type OptionFn
Constants ¶
View Source
const ( // K8sMasterIPEnvironmentKey is the environment variable // key to provide kubernetes master IP address K8sMasterIPEnvironmentKey env.ENVKey = "OPENEBS_IO_K8S_MASTER" // KubeConfigEnvironmentKey is the environment variable // key to provide kubeconfig path KubeConfigEnvironmentKey env.ENVKey = "OPENEBS_IO_KUBE_CONFIG" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct { // IsInCluster flags if this client points // to its own cluster IsInCluster bool // KubeConfigPath to get kubernetes clientset KubeConfigPath string // contains filtered or unexported fields }
Client provides Kubernetes client operations
func (*Client) Clientset ¶
func (c *Client) Clientset() (*kubernetes.Clientset, error)
Clientset returns a new instance of Kubernetes clientset
func (*Client) ConfigForPath ¶
ConfigForPath returns Kubernetes config instance based on KubeConfig path
type OptionFn ¶
type OptionFn func(*Client)
OptionFn is a typed function to abstract any operation against the provided client instance
NOTE:
This is the basic building block to create
functional operations against the client instance
func WithKubeConfigPath ¶
WithKubeConfigPath sets kubeconfig path against this client instance
Click to show internal directories.
Click to hide internal directories.