daemonset

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DaemonSetRolloutStatus

func DaemonSetRolloutStatus(daemon *appsv1.DaemonSet) (string, bool, error)

DaemonSetRolloutStatus returns a message describing daemon set status, and a bool value indicating if the status is considered done.

Types

type DaemonSetStatus

type DaemonSetStatus struct {
	appsv1.DaemonSetStatus

	StatusGeneration uint64

	ReplicasIndicator  *indicators.Int32EqualConditionIndicator
	UpToDateIndicator  *indicators.Int32EqualConditionIndicator
	AvailableIndicator *indicators.Int32EqualConditionIndicator

	WaitingForMessages []string

	IsReady      bool
	IsFailed     bool
	FailedReason string

	Pods         map[string]pod.PodStatus
	NewPodsNames []string
}

func NewDaemonSetStatus

func NewDaemonSetStatus(object *appsv1.DaemonSet, statusGeneration uint64, isTrackerFailed bool, trackerFailedReason string, podsStatuses map[string]pod.PodStatus, newPodsNames []string) DaemonSetStatus

type Feed

type Feed interface {
	controller.ControllerFeed

	OnStatus(func(DaemonSetStatus) error)

	GetStatus() DaemonSetStatus
	Track(name, namespace string, kube kubernetes.Interface, opts tracker.Options) error
}

func NewFeed

func NewFeed() Feed

type PodAddedReport

type PodAddedReport struct {
	// FIXME !!! DaemonSet is not like Deployment.
	// FIXME !!! DaemonSet is not related to ReplicaSet.
	// FIXME !!! Pods of DaemonSet have owner reference directly to ReplicaSet.
	// FIXME !!! Delete all ReplicaSet-related data.
	Pod             replicaset.ReplicaSetPod
	DaemonSetStatus DaemonSetStatus
}

type PodErrorReport

type PodErrorReport struct {
	PodError        replicaset.ReplicaSetPodError
	DaemonSetStatus DaemonSetStatus
}

type Tracker

type Tracker struct {
	tracker.Tracker

	State            tracker.TrackerState
	TrackedPodsNames []string
	Conditions       []string

	Added  chan DaemonSetStatus
	Ready  chan DaemonSetStatus
	Failed chan DaemonSetStatus
	Status chan DaemonSetStatus

	EventMsg    chan string
	AddedPod    chan PodAddedReport
	PodLogChunk chan *replicaset.ReplicaSetPodLogChunk
	PodError    chan PodErrorReport
	// contains filtered or unexported fields
}

func NewTracker

func NewTracker(name, namespace string, kube kubernetes.Interface, opts tracker.Options) *Tracker

func (*Tracker) Track

func (d *Tracker) Track(ctx context.Context) error

Track starts tracking of DaemonSet rollout process. watch only for one DaemonSet resource with name d.ResourceName within the namespace with name d.Namespace Watcher can wait for namespace creation and then for DaemonSet creation watcher receives added event if DaemonSet is started watch is infinite by default there is option StopOnAvailable — if true, watcher stops after DaemonSet has available status you can define custom stop triggers using custom implementation of ControllerFeed.

Jump to

Keyboard shortcuts

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