Documentation ¶
Index ¶
- func IsRequestingPause(pauseRequester PauseRequester, rollout client.Object) bool
- func ProcessChildObjectWithPPND(ctx context.Context, k8sclient client.Client, rollout client.Object, ...) (bool, error)
- type PauseModule
- func (pm *PauseModule) DeletePauseRequest(requester string)
- func (pm *PauseModule) GetISBServiceKey(namespace string, name string) string
- func (pm *PauseModule) GetNumaflowControllerKey(namespace string) string
- func (pm *PauseModule) GetPauseRequest(requester string) (*bool, bool)
- func (pm *PauseModule) NewPauseRequest(requester string)
- func (pm *PauseModule) PausePipeline(ctx context.Context, c client.Client, pipeline *unstructured.Unstructured) error
- func (pm *PauseModule) RunPipelineIfSafe(ctx context.Context, c client.Client, pipeline *unstructured.Unstructured) (bool, error)
- func (pm *PauseModule) UpdatePauseRequest(requester string, pause bool) bool
- func (pm *PauseModule) UpdatePipelineLifecycle(ctx context.Context, c client.Client, pipeline *unstructured.Unstructured, ...) error
- type PauseRequester
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsRequestingPause ¶ added in v0.9.0
func IsRequestingPause(pauseRequester PauseRequester, rollout client.Object) bool
func ProcessChildObjectWithPPND ¶
func ProcessChildObjectWithPPND(ctx context.Context, k8sclient client.Client, rollout client.Object, pauseRequester PauseRequester, resourceNeedsUpdating bool, resourceIsUpdating bool, updateFunc func() error, enqueuePipelineFunc func(k8stypes.NamespacedName)) (bool, error)
process a child object, pausing pipelines or resuming pipelines if needed return: - true if done with PPND - error if any (note we'll automatically reuqueue if there's an error anyway)
Types ¶
type PauseModule ¶
type PauseModule struct { // map of pause requester to Pause Request PauseRequests map[string]*bool // having *bool gives us 3 states: [true=pause-required, false=pause-not-required, nil=unknown] // contains filtered or unexported fields }
func GetPauseModule ¶
func GetPauseModule() *PauseModule
func (*PauseModule) DeletePauseRequest ¶
func (pm *PauseModule) DeletePauseRequest(requester string)
func (*PauseModule) GetISBServiceKey ¶
func (pm *PauseModule) GetISBServiceKey(namespace string, name string) string
func (*PauseModule) GetNumaflowControllerKey ¶
func (pm *PauseModule) GetNumaflowControllerKey(namespace string) string
func (*PauseModule) GetPauseRequest ¶
func (pm *PauseModule) GetPauseRequest(requester string) (*bool, bool)
func (*PauseModule) NewPauseRequest ¶
func (pm *PauseModule) NewPauseRequest(requester string)
func (*PauseModule) PausePipeline ¶
func (pm *PauseModule) PausePipeline(ctx context.Context, c client.Client, pipeline *unstructured.Unstructured) error
pause pipeline
func (*PauseModule) RunPipelineIfSafe ¶
func (pm *PauseModule) RunPipelineIfSafe(ctx context.Context, c client.Client, pipeline *unstructured.Unstructured) (bool, error)
resume pipeline lock the maps while we change pipeline lifecycle so nobody changes their pause request while we run; otherwise, they may think they are pausing the pipeline while it's running
func (*PauseModule) UpdatePauseRequest ¶
func (pm *PauseModule) UpdatePauseRequest(requester string, pause bool) bool
update and return whether the value changed
func (*PauseModule) UpdatePipelineLifecycle ¶
func (pm *PauseModule) UpdatePipelineLifecycle(ctx context.Context, c client.Client, pipeline *unstructured.Unstructured, phase string) error
type PauseRequester ¶
type PauseRequester interface { // get the list of Pipelines corresponding to a Rollout GetPipelineList(ctx context.Context, rolloutNamespace string, rolloutName string) (*unstructured.UnstructuredList, error) // get the unique key corresponding to this Rollout GetRolloutKey(rolloutNamespace string, rolloutName string) string // just a free form string to describe what we're deploying, for logging GetChildTypeString() string }
PauseRequester interface manages the safe update of Rollouts by requesting Pipelines to pause
Click to show internal directories.
Click to hide internal directories.