Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
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
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 ¶
ReconcileSidecarSet reconciles a SidecarSet object
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
Click to show internal directories.
Click to hide internal directories.