sidecarset

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 43 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager) error

Add creates a new SidecarSet Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller and Start it when the Manager is Started.

func SortUpdateIndexes added in v0.9.0

func SortUpdateIndexes(strategy appsv1alpha1.SidecarSetUpdateStrategy, pods []*corev1.Pod, waitUpdateIndexes []int) []int

SortUpdateIndexes sorts the given waitUpdateIndexes of Pods to update according to the SidecarSet update strategy.

Types

type Processor added in v0.8.0

type Processor struct {
	Client client.Client
	// contains filtered or unexported fields
}

func NewSidecarSetProcessor added in v0.8.0

func NewSidecarSetProcessor(cli client.Client, rec record.EventRecorder) *Processor

func (*Processor) UpdateSidecarSet added in v0.8.0

func (p *Processor) UpdateSidecarSet(sidecarSet *appsv1alpha1.SidecarSet) (reconcile.Result, error)

type ReconcileSidecarSet

type ReconcileSidecarSet struct {
	client.Client
	// contains filtered or unexported fields
}

ReconcileSidecarSet reconciles a SidecarSet object

func (*ReconcileSidecarSet) Reconcile

Reconcile reads that state of the cluster for a SidecarSet object and makes changes based on the state read and what is in the SidecarSet.Spec

type Strategy added in v0.8.0

type Strategy interface {
	// according to sidecarset's upgrade strategy, select the pods to be upgraded, include the following:
	//1. select which pods can be upgrade, the following:
	//	* pod must be not updated for the latest sidecarSet
	//	* If selector is not nil, this upgrade will only update the selected pods.
	//2. Sort Pods with default sequence
	//3. sort waitUpdateIndexes based on the scatter rules
	//4. calculate max count of pods can update with maxUnavailable
	//5. also return the pods that are not upgradable
	GetNextUpgradePods(control sidecarcontrol.SidecarControl, pods []*corev1.Pod) (upgradePods []*corev1.Pod, notUpgradablePods []*corev1.Pod)
}

func NewStrategy added in v0.8.0

func NewStrategy() Strategy

Jump to

Keyboard shortcuts

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