replica

package
v1.4.14 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Helper

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

Helper provide methods for replica update of deployment resource that has highAvailabilitylabel.

func NewHelper

func NewHelper(client clientset.Interface) (*Helper, error)

NewHelper creates a helper to update deployment replicas.

func (*Helper) UpdateBeforeNodeDrains added in v1.3.0

func (r *Helper) UpdateBeforeNodeDrains() error

UpdateBeforeNodeDrains patches affinity rules and wait for pod running before node remove. Patch will apply to deployment with preferredDuringSchedulingIgnoredDuringExecution affinity when cluster size equal or less then replicas.

func (*Helper) UpdateNodes

func (r *Helper) UpdateNodes() error

UpdateNodes patches for replicas affinity rules after adding nodes, before removing nodes, or after addon upgrade. This updates affinity rule to preferredDuringSchedulingIgnoredDuringExecution of cluster size less then replica size, and updates affinity rule to requiredDuringSchedulingIgnoredDuringExecution when cluster size is equal or greater to replicas.

Jump to

Keyboard shortcuts

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