daemonset

package
v0.0.0-...-d0642ff Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 13 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGVR

GetGVR returns the GroupVersionResource for the daemonset.

Types

type AdditionalOptions

type AdditionalOptions func(builder *Builder) (*Builder, error)

AdditionalOptions additional options for daemonset object.

type Builder

type Builder struct {
	// Daemonset definition. Used to create a daemonset object.
	Definition *appsv1.DaemonSet
	// Created daemonset object.
	Object *appsv1.DaemonSet
	// contains filtered or unexported fields
}

Builder provides struct for daemonset object containing connection to the cluster and the daemonset definitions.

func NewBuilder

func NewBuilder(
	apiClient *clients.Settings, name, nsname string, labels map[string]string, containerSpec corev1.Container) *Builder

NewBuilder creates a new instance of Builder.

func Pull

func Pull(apiClient *clients.Settings, name, nsname string) (*Builder, error)

Pull loads an existing daemonSet into the Builder struct.

func (*Builder) Create

func (builder *Builder) Create() (*Builder, error)

Create builds daemonset in the cluster and stores the created object in struct.

func (*Builder) CreateAndWaitUntilReady

func (builder *Builder) CreateAndWaitUntilReady(timeout time.Duration) (*Builder, error)

CreateAndWaitUntilReady creates a daemonset in the cluster and waits until the daemonset is available.

func (*Builder) Delete

func (builder *Builder) Delete() error

Delete removes the daemonset.

func (*Builder) DeleteAndWait

func (builder *Builder) DeleteAndWait(timeout time.Duration) error

DeleteAndWait deletes a daemonset and waits until it is removed from the cluster.

func (*Builder) Exists

func (builder *Builder) Exists() bool

Exists checks whether the given daemonset exists.

func (*Builder) IsReady

func (builder *Builder) IsReady(timeout time.Duration) bool

IsReady waits for the daemonset to reach expected number of pods in Ready state.

func (*Builder) Update

func (builder *Builder) Update() (*Builder, error)

Update renovates the existing daemonset object with daemonset definition in builder.

func (*Builder) WithAdditionalContainerSpecs

func (builder *Builder) WithAdditionalContainerSpecs(specs []corev1.Container) *Builder

WithAdditionalContainerSpecs appends a list of container specs to the daemonset definition.

func (*Builder) WithHostNetwork

func (builder *Builder) WithHostNetwork() *Builder

WithHostNetwork applies HostNetwork to daemonset definition.

func (*Builder) WithNodeSelector

func (builder *Builder) WithNodeSelector(selector map[string]string) *Builder

WithNodeSelector applies nodeSelector to the daemonset definition.

func (*Builder) WithOptions

func (builder *Builder) WithOptions(options ...AdditionalOptions) *Builder

WithOptions creates daemonset with generic mutation options.

func (*Builder) WithPodAffinity

func (builder *Builder) WithPodAffinity(podAffinity *corev1.Affinity) *Builder

WithPodAffinity applies pod's Affinity to daemonset definition.

func (*Builder) WithVolume

func (builder *Builder) WithVolume(dsVolume corev1.Volume) *Builder

WithVolume defines Volume of daemonset under PodTemplateSpec.

Jump to

Keyboard shortcuts

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