Documentation
¶
Index ¶
- Variables
- type Client
- 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) Apply(resources kubernetes.Marshaler, forceConflicts bool) error
- func (k *Kubectl) CreateConfigMap(ctx context.Context, configMap corev1.ConfigMap) error
- func (k *Kubectl) SetKubeconfig(kubeconfig []byte)
- func (k *Kubectl) WaitForCRDs(ctx context.Context, crds []string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrKubeconfigNotSet = errors.New("kubeconfig not set")
ErrKubeconfigNotSet is the error value returned by Kubectl.Apply when SetKubeconfig was not called first.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // ApplyOneObject applies a k8s resource similar to kubectl apply. ApplyOneObject(info *resource.Info, forceConflicts bool) error // GetObjects converts resources into prepared info fields for use in ApplyOneObject. GetObjects(resources kubernetes.Marshaler) ([]*resource.Info, error) CreateConfigMap(ctx context.Context, configMap corev1.ConfigMap) error AddTolerationsToDeployment(ctx context.Context, tolerations []corev1.Toleration, name string, namespace string) error AddNodeSelectorsToDeployment(ctx context.Context, selectors map[string]string, name string, namespace string) error // WaitForCRD waits for the given CRD to be established. WaitForCRD(ctx context.Context, crd string) error }
Client wraps marshable k8s resources into resource.Info fields and applies them in a cluster.
type Kubectl ¶
type Kubectl struct {
// contains filtered or unexported fields
}
Kubectl implements kubernetes.Apply interface and acts like the Kubernetes "kubectl" tool.
func (*Kubectl) AddNodeSelectorsToDeployment ¶
func (*Kubectl) AddTolerationsToDeployment ¶
func (*Kubectl) Apply ¶
func (k *Kubectl) Apply(resources kubernetes.Marshaler, forceConflicts bool) error
Apply will apply the given resources using server-side-apply.
func (*Kubectl) CreateConfigMap ¶
func (*Kubectl) SetKubeconfig ¶
SetKubeconfig will store the kubeconfig to generate Clients using the clientGenerator later.
Click to show internal directories.
Click to hide internal directories.