Documentation ¶
Index ¶
- func GetCondition(pod *v1.Pod) *v1.PodCondition
- func GetTemplateFromRevision(revision *apps.ControllerRevision) (*v1.PodTemplateSpec, error)
- func InjectReadinessGate(pod *v1.Pod)
- type Interface
- func New(c client.Client, revisionKey string) Interface
- func NewForInformer(informer coreinformers.PodInformer, revisionKey string) Interface
- func NewForTest(c client.Client, revisionKey string, now func() metav1.Time) Interface
- func NewForTypedClient(c clientset.Interface, revisionKey string) Interface
- type RefreshResult
- type UpdateOptions
- type UpdateResult
- type UpdateSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCondition ¶
func GetCondition(pod *v1.Pod) *v1.PodCondition
GetCondition returns the InPlaceUpdateReady condition in Pod.
func GetTemplateFromRevision ¶ added in v0.5.0
func GetTemplateFromRevision(revision *apps.ControllerRevision) (*v1.PodTemplateSpec, error)
GetTemplateFromRevision returns the pod template parsed from ControllerRevision.
func InjectReadinessGate ¶
InjectReadinessGate injects InPlaceUpdateReady into pod.spec.readinessGates
Types ¶
type Interface ¶
type Interface interface { Refresh(pod *v1.Pod, opts *UpdateOptions) RefreshResult CanUpdateInPlace(oldRevision, newRevision *apps.ControllerRevision, opts *UpdateOptions) bool Update(pod *v1.Pod, oldRevision, newRevision *apps.ControllerRevision, opts *UpdateOptions) UpdateResult }
Interface for managing pods in-place update.
func NewForInformer ¶
func NewForInformer(informer coreinformers.PodInformer, revisionKey string) Interface
func NewForTest ¶
type RefreshResult ¶ added in v0.4.1
type UpdateOptions ¶ added in v0.4.1
type UpdateOptions struct { GracePeriodSeconds int32 AdditionalFuncs []func(*v1.Pod) CalculateSpec func(oldRevision, newRevision *apps.ControllerRevision, opts *UpdateOptions) *UpdateSpec PatchSpecToPod func(pod *v1.Pod, spec *UpdateSpec) (*v1.Pod, error) CheckUpdateCompleted func(pod *v1.Pod) error GetRevision func(rev *apps.ControllerRevision) string }
func SetOptionsDefaults ¶ added in v0.8.0
func SetOptionsDefaults(opts *UpdateOptions) *UpdateOptions
type UpdateResult ¶ added in v0.4.1
type UpdateSpec ¶ added in v0.5.0
type UpdateSpec struct { Revision string `json:"revision"` Annotations map[string]string `json:"annotations,omitempty"` ContainerImages map[string]string `json:"containerImages,omitempty"` MetaDataPatch []byte `json:"metaDataPatch,omitempty"` GraceSeconds int32 `json:"graceSeconds,omitempty"` OldTemplate *v1.PodTemplateSpec `json:"oldTemplate,omitempty"` NewTemplate *v1.PodTemplateSpec `json:"newTemplate,omitempty"` }
UpdateSpec records the images of containers which need to in-place update.
Click to show internal directories.
Click to hide internal directories.