diff --git a/resource_customizations/numaplane.numaproj.io/MonoVertexRollout/actions/testdata/MonoVertexRollout/rollout-running-fast.yaml b/resource_customizations/numaplane.numaproj.io/MonoVertexRollout/actions/testdata/MonoVertexRollout/rollout-running-fast.yaml index 5298209fda..158eeae29b 100644 --- a/resource_customizations/numaplane.numaproj.io/MonoVertexRollout/actions/testdata/MonoVertexRollout/rollout-running-fast.yaml +++ b/resource_customizations/numaplane.numaproj.io/MonoVertexRollout/actions/testdata/MonoVertexRollout/rollout-running-fast.yaml @@ -15,6 +15,9 @@ metadata: resourceVersion: '947414' uid: a63f377e-1500-437e-9267-579f4a790518 spec: + strategy: + pauseResume: + fastResume: true monoVertex: metadata: annotations: diff --git a/resource_customizations/numaplane.numaproj.io/MonoVertexRollout/actions/testdata/MonoVertexRollout/rollout-running-gradual.yaml b/resource_customizations/numaplane.numaproj.io/MonoVertexRollout/actions/testdata/MonoVertexRollout/rollout-running-gradual.yaml index a26c3e168f..1c86b9c819 100644 --- a/resource_customizations/numaplane.numaproj.io/MonoVertexRollout/actions/testdata/MonoVertexRollout/rollout-running-gradual.yaml +++ b/resource_customizations/numaplane.numaproj.io/MonoVertexRollout/actions/testdata/MonoVertexRollout/rollout-running-gradual.yaml @@ -15,12 +15,14 @@ metadata: resourceVersion: '947414' uid: a63f377e-1500-437e-9267-579f4a790518 spec: + strategy: + pauseResume: + fastResume: false monoVertex: metadata: annotations: numaflow.numaproj.io/allowed-resume-strategies: "slow, fast" spec: - replicas: null lifecycle: desiredPhase: Running sink: diff --git a/resource_customizations/numaplane.numaproj.io/MonoVertexRollout/actions/unpause-fast/action.lua b/resource_customizations/numaplane.numaproj.io/MonoVertexRollout/actions/unpause-fast/action.lua index c5aa23b690..1cbb6192f9 100644 --- a/resource_customizations/numaplane.numaproj.io/MonoVertexRollout/actions/unpause-fast/action.lua +++ b/resource_customizations/numaplane.numaproj.io/MonoVertexRollout/actions/unpause-fast/action.lua @@ -1,2 +1,10 @@ obj.spec.monoVertex.spec.lifecycle.desiredPhase = "Running" +-- set strategy.fastResume to true +if obj.spec.strategy == nil then + obj.spec.strategy = {} +end +if obj.spec.strategy.pauseResume == nil then + obj.spec.strategy.pauseResume = {} +end +obj.spec.strategy.pauseResume.fastResume = true return obj \ No newline at end of file diff --git a/resource_customizations/numaplane.numaproj.io/MonoVertexRollout/actions/unpause-gradual/action.lua b/resource_customizations/numaplane.numaproj.io/MonoVertexRollout/actions/unpause-gradual/action.lua index 40a4d05b55..92946fb287 100644 --- a/resource_customizations/numaplane.numaproj.io/MonoVertexRollout/actions/unpause-gradual/action.lua +++ b/resource_customizations/numaplane.numaproj.io/MonoVertexRollout/actions/unpause-gradual/action.lua @@ -1,3 +1,10 @@ obj.spec.monoVertex.spec.lifecycle.desiredPhase = "Running" -obj.spec.monoVertex.spec.replicas = null +-- set strategy.fastResume to false +if obj.spec.strategy == nil then + obj.spec.strategy = {} +end +if obj.spec.strategy.pauseResume == nil then + obj.spec.strategy.pauseResume = {} +end +obj.spec.strategy.pauseResume.fastResume = false return obj \ No newline at end of file diff --git a/resource_customizations/numaplane.numaproj.io/PipelineRollout/actions/testdata/PipelineRollout/rollout-running-fast.yaml b/resource_customizations/numaplane.numaproj.io/PipelineRollout/actions/testdata/PipelineRollout/rollout-running-fast.yaml index 2ebd81924d..f2b46ca4ee 100644 --- a/resource_customizations/numaplane.numaproj.io/PipelineRollout/actions/testdata/PipelineRollout/rollout-running-fast.yaml +++ b/resource_customizations/numaplane.numaproj.io/PipelineRollout/actions/testdata/PipelineRollout/rollout-running-fast.yaml @@ -13,10 +13,12 @@ metadata: resourceVersion: "14008" uid: ab9286a1-f453-433e-846e-48900ab2068a spec: + strategy: + pauseResume: + fastResume: true pipeline: metadata: annotations: - numaflow.numaproj.io/resume-strategy: "fast" numaflow.numaproj.io/allowed-resume-strategies: "slow, fast" spec: lifecycle: diff --git a/resource_customizations/numaplane.numaproj.io/PipelineRollout/actions/testdata/PipelineRollout/rollout-running-gradual.yaml b/resource_customizations/numaplane.numaproj.io/PipelineRollout/actions/testdata/PipelineRollout/rollout-running-gradual.yaml index ef30b97e72..d24f6f259d 100644 --- a/resource_customizations/numaplane.numaproj.io/PipelineRollout/actions/testdata/PipelineRollout/rollout-running-gradual.yaml +++ b/resource_customizations/numaplane.numaproj.io/PipelineRollout/actions/testdata/PipelineRollout/rollout-running-gradual.yaml @@ -13,10 +13,12 @@ metadata: resourceVersion: "14008" uid: ab9286a1-f453-433e-846e-48900ab2068a spec: + strategy: + pauseResume: + fastResume: false pipeline: metadata: annotations: - numaflow.numaproj.io/resume-strategy: "slow" numaflow.numaproj.io/allowed-resume-strategies: "slow, fast" spec: lifecycle: diff --git a/resource_customizations/numaplane.numaproj.io/PipelineRollout/actions/unpause-fast/action.lua b/resource_customizations/numaplane.numaproj.io/PipelineRollout/actions/unpause-fast/action.lua index e67e2b9878..d5ef4822bd 100644 --- a/resource_customizations/numaplane.numaproj.io/PipelineRollout/actions/unpause-fast/action.lua +++ b/resource_customizations/numaplane.numaproj.io/PipelineRollout/actions/unpause-fast/action.lua @@ -1,9 +1,10 @@ obj.spec.pipeline.spec.lifecycle.desiredPhase = "Running" -if obj.spec.pipeline.metadata == nil then - obj.spec.pipeline.metadata = {} +-- set strategy.fastResume to true +if obj.spec.strategy == nil then + obj.spec.strategy = {} end -if obj.spec.pipeline.metadata.annotations == nil then - obj.spec.pipeline.metadata.annotations = {} +if obj.spec.strategy.pauseResume == nil then + obj.spec.strategy.pauseResume = {} end -obj.spec.pipeline.metadata.annotations["numaflow.numaproj.io/resume-strategy"] = "fast" +obj.spec.strategy.pauseResume.fastResume = true return obj \ No newline at end of file diff --git a/resource_customizations/numaplane.numaproj.io/PipelineRollout/actions/unpause-gradual/action.lua b/resource_customizations/numaplane.numaproj.io/PipelineRollout/actions/unpause-gradual/action.lua index bab9104f56..ea50c8b592 100644 --- a/resource_customizations/numaplane.numaproj.io/PipelineRollout/actions/unpause-gradual/action.lua +++ b/resource_customizations/numaplane.numaproj.io/PipelineRollout/actions/unpause-gradual/action.lua @@ -1,9 +1,10 @@ obj.spec.pipeline.spec.lifecycle.desiredPhase = "Running" -if obj.spec.pipeline.metadata == nil then - obj.spec.pipeline.metadata = {} +-- set strategy.fastResume to false +if obj.spec.strategy == nil then + obj.spec.strategy = {} end -if obj.spec.pipeline.metadata.annotations == nil then - obj.spec.pipeline.metadata.annotations = {} +if obj.spec.strategy.pauseResume == nil then + obj.spec.strategy.pauseResume = {} end -obj.spec.pipeline.metadata.annotations["numaflow.numaproj.io/resume-strategy"] = "slow" +obj.spec.strategy.pauseResume.fastResume = false return obj \ No newline at end of file