Documentation
¶
Index ¶
- type K8s
- func (k8s *K8s) ContextNames() []string
- func (k8s *K8s) ContextNamesWithPrefix(prefix string) []string
- func (k8s *K8s) DeploymentNamesWithPrefix(prefix string, labelSelector string) []string
- func (k8s *K8s) Deployments(labelSelector string) []appsv1.Deployment
- func (k8s *K8s) SelectContext(context string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type K8s ¶
type K8s struct {
Config api.Config
RestConfig *rest.Config
Clientset *kubernetes.Clientset
Contexts map[string]*api.Context
}
K8s is a struct of the commonly used kubernetes client
func (*K8s) ContextNames ¶
func (k8s *K8s) ContextNames() []string
ContextNames returns the contexts available in a kubeconfig
func (*K8s) ContextNamesWithPrefix ¶
func (k8s *K8s) ContextNamesWithPrefix(prefix string) []string
ContextNamesWithPrefix returns the context names that begins with the passed prefix
func (*K8s) DeploymentNamesWithPrefix ¶
func (k8s *K8s) DeploymentNamesWithPrefix(prefix string, labelSelector string) []string
DeploymentNamesWithPrefix returns the context names that begins with the passed prefix
func (*K8s) Deployments ¶
func (k8s *K8s) Deployments(labelSelector string) []appsv1.Deployment
Deployments returns a list of deployments
func (*K8s) SelectContext ¶
func (k8s *K8s) SelectContext(context string)
SelectContext selects a context to connect the clientset to
Click to show internal directories.
Click to hide internal directories.