cluster

package
v0.0.0-...-9fcf0b5 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0, MIT Imports: 7 Imported by: 4

Documentation

Overview

Package cluster provides functions for dealing with Kubernetes clusters.

Index

Constants

View Source
const (
	// NamespaceDefault is the name of the default Kubernetes namespace.
	NamespaceDefault = "default"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

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

Cluster presents Kubernetes API method over a Kubernetes cluster.

func New

func New(config *rest.Config) (*Cluster, error)

New initializes a new Cluster from the given client REST config.

func (*Cluster) Client

func (c *Cluster) Client() kubernetes.Interface

Client returns the underlying Kubernetes client.

func (*Cluster) CreateDaemonset

func (c *Cluster) CreateDaemonset(ctx context.Context, ds *appsv1.DaemonSet) (*appsv1.DaemonSet, error)

CreateDaemonset creates a daemonset with default options.

func (*Cluster) DeleteDaemonset

func (c *Cluster) DeleteDaemonset(ctx context.Context, ds *appsv1.DaemonSet) error

DeleteDaemonset deletes a daemonset from this cluster.

func (*Cluster) WaitForDaemonset

func (c *Cluster) WaitForDaemonset(ctx context.Context, ds *appsv1.DaemonSet) error

WaitForDaemonset waits until a daemonset has propagated containers across the affected nodes.

Jump to

Keyboard shortcuts

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