client

package
v2.2.0-pre Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2022 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client implements k8sapi.Client interface and talks to the Kubernetes API.

func New

func New(config []byte) (*Client, error)

New creates a new Client, talking to the real k8s API.

func (*Client) AddNodeSelectorsToDeployment

func (c *Client) AddNodeSelectorsToDeployment(ctx context.Context, selectors map[string]string, name string, namespace string) error

func (*Client) AddTolerationsToDeployment

func (c *Client) AddTolerationsToDeployment(ctx context.Context, tolerations []corev1.Toleration, name string, namespace string) error

func (*Client) ApplyOneObject

func (c *Client) ApplyOneObject(info *resource.Info, forceConflicts bool) error

ApplyOneObject uses server-side apply to send unstructured JSON blobs to the server and let it handle the core logic.

func (*Client) CreateConfigMap

func (c *Client) CreateConfigMap(ctx context.Context, configMap corev1.ConfigMap) error

CreateConfigMap creates the given ConfigMap.

func (*Client) GetObjects

func (c *Client) GetObjects(resources kubernetesshared.Marshaler) ([]*resource.Info, error)

GetObjects tries to marshal the resources into []*resource.Info using a resource.Builder.

func (*Client) WaitForCRD

func (c *Client) WaitForCRD(ctx context.Context, crd string) error

WaitForCRD waits for the given CRD to be established.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL