Documentation
¶
Index ¶
- Constants
- Variables
- func CreateDefaultISBService(jetstreamVersion string, phase numaflowv1.ISBSvcPhase, fullyReconciled bool) *numaflowv1.InterStepBufferService
- func CreateDefaultISBServiceSpec(jetstreamVersion string) numaflowv1.InterStepBufferServiceSpec
- func CreateDefaultTestMVOfPhase(phase numaflowv1.MonoVertexPhase) *numaflowv1.MonoVertex
- func CreateDefaultTestPipelineOfPhase(phase numaflowv1.PipelinePhase) *numaflowv1.Pipeline
- func CreateDeploymentInK8S(ctx context.Context, t *testing.T, k8sClientSet *k8sclientgo.Clientset, ...)
- func CreateISBServiceRollout(isbsvcSpec numaflowv1.InterStepBufferServiceSpec) *apiv1.ISBServiceRollout
- func CreateISBServiceRolloutInK8S(ctx context.Context, t *testing.T, numaplaneClient client.Client, ...)
- func CreateISBSvcInK8S(ctx context.Context, t *testing.T, ...)
- func CreateMVRolloutInK8S(ctx context.Context, t *testing.T, numaplaneClient client.Client, ...)
- func CreateMonoVertexInK8S(ctx context.Context, t *testing.T, ...)
- func CreateNumaflowControllerInK8S(ctx context.Context, t *testing.T, numaplaneClient client.Client, ...)
- func CreatePipelineInK8S(ctx context.Context, t *testing.T, ...)
- func CreatePipelineRolloutInK8S(ctx context.Context, t *testing.T, numaplaneClient client.Client, ...)
- func CreateStatefulSetInK8S(ctx context.Context, t *testing.T, k8sClientSet *k8sclientgo.Clientset, ...)
- func CreateTestMVRollout(mvSpec numaflowv1.MonoVertexSpec, rolloutAnnotations map[string]string, ...) *apiv1.MonoVertexRollout
- func CreateTestMonoVertexOfSpec(spec numaflowv1.MonoVertexSpec, name string, phase numaflowv1.MonoVertexPhase, ...) *numaflowv1.MonoVertex
- func CreateTestPipelineOfSpec(spec numaflowv1.PipelineSpec, name string, phase numaflowv1.PipelinePhase, ...) *numaflowv1.Pipeline
- func CreateTestPipelineRollout(pipelineSpec numaflowv1.PipelineSpec, rolloutAnnotations map[string]string, ...) *apiv1.PipelineRollout
- func GetNumaflowControllerDefinitions(definitionsFile string) (*config.NumaflowControllerDefinitionConfig, error)
- func GetRolloutParentName(childName string) (string, error)
- func PipelineWithDesiredPhase(spec numaflowv1.PipelineSpec, phase numaflowv1.PipelinePhase) numaflowv1.PipelineSpec
- func VerifyAutoHealing(ctx context.Context, gvk schema.GroupVersionKind, namespace string, ...)
- func VerifyStatusPhase(ctx context.Context, gvk schema.GroupVersionKind, namespace string, ...)
- type InProgressStrategyMgr
- type RolloutObject
- type TypedGenerationChangedPredicate
Constants ¶
View Source
const ( TestDefaultTimeout = 15 * time.Second TestDefaultDuration = 10 * time.Second TestDefaultInterval = 250 * time.Millisecond )
Variables ¶
View Source
var ( DefaultTestNamespace = "default" DefaultTestISBSvcRolloutName = "isbservicerollout-test" DefaultTestISBSvcName = DefaultTestISBSvcRolloutName + "-0" DefaultTestPipelineRolloutName = "pipelinerollout-test" DefaultTestPipelineName = DefaultTestPipelineRolloutName + "-0" DefaultTestMonoVertexRolloutName = "monovertexrollout-test" DefaultTestMonoVertexName = DefaultTestMonoVertexRolloutName + "-0" DefaultTestNumaflowControllerRolloutName = "numaflow-controller" DefaultTestNumaflowControllerName = "numaflow-controller" // TODO: change to add "-0" suffix after Progressive DefaultTestNumaflowControllerDeploymentName = "numaflow-controller" )
View Source
var ( TestRESTConfig *rest.Config TestK8sClient client.Client TestCustomMetrics *metrics.CustomMetrics )
Functions ¶
func CreateDefaultISBService ¶ added in v0.11.0
func CreateDefaultISBService(jetstreamVersion string, phase numaflowv1.ISBSvcPhase, fullyReconciled bool) *numaflowv1.InterStepBufferService
func CreateDefaultISBServiceSpec ¶ added in v0.11.0
func CreateDefaultISBServiceSpec(jetstreamVersion string) numaflowv1.InterStepBufferServiceSpec
func CreateDefaultTestMVOfPhase ¶ added in v0.10.0
func CreateDefaultTestMVOfPhase(phase numaflowv1.MonoVertexPhase) *numaflowv1.MonoVertex
func CreateDefaultTestPipelineOfPhase ¶
func CreateDefaultTestPipelineOfPhase(phase numaflowv1.PipelinePhase) *numaflowv1.Pipeline
func CreateDeploymentInK8S ¶
func CreateDeploymentInK8S(ctx context.Context, t *testing.T, k8sClientSet *k8sclientgo.Clientset, deployment *appsv1.Deployment)
func CreateISBServiceRollout ¶ added in v0.11.0
func CreateISBServiceRollout(isbsvcSpec numaflowv1.InterStepBufferServiceSpec) *apiv1.ISBServiceRollout
func CreateISBServiceRolloutInK8S ¶ added in v0.11.0
func CreateISBSvcInK8S ¶
func CreateISBSvcInK8S(ctx context.Context, t *testing.T, numaflowClientSet *numaflowversioned.Clientset, isbsvc *numaflowv1.InterStepBufferService)
func CreateMVRolloutInK8S ¶ added in v0.10.0
func CreateMonoVertexInK8S ¶ added in v0.10.0
func CreateMonoVertexInK8S(ctx context.Context, t *testing.T, numaflowClientSet *numaflowversioned.Clientset, monoVertex *numaflowv1.MonoVertex)
func CreateNumaflowControllerInK8S ¶ added in v0.10.0
func CreatePipelineInK8S ¶
func CreatePipelineInK8S(ctx context.Context, t *testing.T, numaflowClientSet *numaflowversioned.Clientset, pipeline *numaflowv1.Pipeline)
func CreateStatefulSetInK8S ¶
func CreateStatefulSetInK8S(ctx context.Context, t *testing.T, k8sClientSet *k8sclientgo.Clientset, statefulSet *appsv1.StatefulSet)
func CreateTestMVRollout ¶ added in v0.10.0
func CreateTestMVRollout(mvSpec numaflowv1.MonoVertexSpec, rolloutAnnotations map[string]string, rolloutLabels map[string]string, mvAnnotations map[string]string, mvLabels map[string]string) *apiv1.MonoVertexRollout
func CreateTestMonoVertexOfSpec ¶ added in v0.10.0
func CreateTestMonoVertexOfSpec( spec numaflowv1.MonoVertexSpec, name string, phase numaflowv1.MonoVertexPhase, status numaflowv1.Status, labels map[string]string, annotations map[string]string, ) *numaflowv1.MonoVertex
func CreateTestPipelineOfSpec ¶
func CreateTestPipelineOfSpec( spec numaflowv1.PipelineSpec, name string, phase numaflowv1.PipelinePhase, status numaflowv1.Status, drainedOnPause bool, labels map[string]string, annotations map[string]string, ) *numaflowv1.Pipeline
func CreateTestPipelineRollout ¶
func CreateTestPipelineRollout(pipelineSpec numaflowv1.PipelineSpec, rolloutAnnotations map[string]string, rolloutLabels map[string]string, pipelineAnnotations map[string]string, pipelineLabels map[string]string) *apiv1.PipelineRollout
func GetNumaflowControllerDefinitions ¶
func GetNumaflowControllerDefinitions(definitionsFile string) (*config.NumaflowControllerDefinitionConfig, error)
func GetRolloutParentName ¶
assume child name is "<rolloutname>-<number>"
func PipelineWithDesiredPhase ¶
func PipelineWithDesiredPhase(spec numaflowv1.PipelineSpec, phase numaflowv1.PipelinePhase) numaflowv1.PipelineSpec
func VerifyAutoHealing ¶
func VerifyAutoHealing(ctx context.Context, gvk schema.GroupVersionKind, namespace string, resourceName string, pathToValue string, newValue any)
VerifyAutoHealing tests the auto healing feature
func VerifyStatusPhase ¶
Types ¶
type InProgressStrategyMgr ¶
type InProgressStrategyMgr struct {
Store *inProgressStrategyStore
// contains filtered or unexported fields
}
InProgressStrategyMgr is responsible to maintain a Rollout's inProgressStrategy state is maintained both in memory as well as in the Rollout's Status in memory always gives us the latest state in case the Informer cache is out of date the Rollout's Status is useful as a backup mechanism in case Numaplane has just restarted
func NewInProgressStrategyMgr ¶
func NewInProgressStrategyMgr( getRolloutStrategy func(context.Context, client.Object) *apiv1.UpgradeStrategy, setRolloutStrategy func(context.Context, client.Object, apiv1.UpgradeStrategy)) *InProgressStrategyMgr
func (*InProgressStrategyMgr) GetStrategy ¶
func (mgr *InProgressStrategyMgr) GetStrategy(ctx context.Context, rollout client.Object) apiv1.UpgradeStrategy
func (*InProgressStrategyMgr) SetStrategy ¶
func (mgr *InProgressStrategyMgr) SetStrategy(ctx context.Context, rollout client.Object, upgradeStrategy apiv1.UpgradeStrategy)
store in both memory and the Resource itself
func (*InProgressStrategyMgr) UnsetStrategy ¶
func (mgr *InProgressStrategyMgr) UnsetStrategy(ctx context.Context, rollout client.Object)
type RolloutObject ¶
type RolloutObject interface {
GetRolloutGVR() metav1.GroupVersionResource
GetRolloutGVK() schema.GroupVersionKind
GetChildGVR() metav1.GroupVersionResource
GetChildGVK() schema.GroupVersionKind
GetRolloutObjectMeta() *metav1.ObjectMeta
GetRolloutStatus() *apiv1.Status
}
type TypedGenerationChangedPredicate ¶ added in v0.11.0
type TypedGenerationChangedPredicate[object metav1.Object] struct { // Returns true by default for all events; see overrides below. predicate.TypedFuncs[object] }
func (TypedGenerationChangedPredicate[object]) Update ¶ added in v0.11.0
func (p TypedGenerationChangedPredicate[object]) Update(e event.TypedUpdateEvent[object]) bool
Source Files
¶
Click to show internal directories.
Click to hide internal directories.