Documentation ¶
Index ¶
- type Kubectl
- func (k *Kubectl) AddNodeSelectorsToDeployment(ctx context.Context, selectors map[string]string, name string, ...) error
- func (k *Kubectl) AddTolerationsToDeployment(ctx context.Context, tolerations []corev1.Toleration, name string, ...) error
- func (k *Kubectl) AnnotateNode(ctx context.Context, nodeName, annotationKey, annotationValue string) error
- func (k *Kubectl) CreateConfigMap(ctx context.Context, configMap corev1.ConfigMap) error
- func (k *Kubectl) Initialize(kubeconfig []byte) error
- func (k *Kubectl) ListAllNamespaces(ctx context.Context) (*corev1.NamespaceList, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Kubectl ¶
type Kubectl struct { kubernetes.Interface // contains filtered or unexported fields }
Kubectl implements functionality of the Kubernetes "kubectl" tool.
func New ¶
func New() *Kubectl
New returns an empty Kubectl client. Need to call Initialize before usable.
func (*Kubectl) AddNodeSelectorsToDeployment ¶
func (k *Kubectl) AddNodeSelectorsToDeployment(ctx context.Context, selectors map[string]string, name string, namespace string) error
AddNodeSelectorsToDeployment adds K8s selectors to the deployment, identified by name and namespace.
func (*Kubectl) AddTolerationsToDeployment ¶
func (k *Kubectl) AddTolerationsToDeployment(ctx context.Context, tolerations []corev1.Toleration, name string, namespace string) error
AddTolerationsToDeployment adds K8s tolerations to the deployment, identified by name and namespace.
func (*Kubectl) AnnotateNode ¶ added in v2.3.0
func (k *Kubectl) AnnotateNode(ctx context.Context, nodeName, annotationKey, annotationValue string) error
AnnotateNode adds the provided annotations to the node, identified by name.
func (*Kubectl) CreateConfigMap ¶
CreateConfigMap creates the provided configmap.
func (*Kubectl) Initialize ¶ added in v2.3.0
Initialize sets sets all required fields so the Kubectl client can be used.
func (*Kubectl) ListAllNamespaces ¶ added in v2.2.0
ListAllNamespaces returns all namespaces in the cluster.
Click to show internal directories.
Click to hide internal directories.