ppnd

package
v0.26.2 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

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) RunPipeline added in v0.13.0

func (pm *PauseModule) RunPipeline(ctx context.Context, c client.Client, pipeline *unstructured.Unstructured, isbsvcName string, force bool, resumeFast 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 args: - force: if force is false, then first check to make sure numaflow controller and isbsvc aren't requesting pause - resumeFast: determines the speed of resume (whether it goes back to original number of pods running pre-pause or goes to min)

func (*PauseModule) SetPipelineLifecyclePaused added in v0.25.1

func (pm *PauseModule) SetPipelineLifecyclePaused(ctx context.Context, c client.Client, pipeline *unstructured.Unstructured) error

func (*PauseModule) SetPipelineLifecycleRunning added in v0.25.1

func (pm *PauseModule) SetPipelineLifecycleRunning(ctx context.Context, c client.Client, pipeline *unstructured.Unstructured, resumeFast bool) error

func (*PauseModule) UpdatePauseRequest

func (pm *PauseModule) UpdatePauseRequest(requester string, pause bool) bool

update and return whether the value changed

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

type PipelineDesiredPhase added in v0.25.0

type PipelineDesiredPhase string
const PausedDesiredPhase PipelineDesiredPhase = "Paused"
const RunningDesiredPhase PipelineDesiredPhase = "Running"

Jump to

Keyboard shortcuts

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