feat: improve numa actions (#22835)

Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
This commit is contained in:
Dillen Padhiar 2025-05-29 08:24:32 -07:00 committed by GitHub
parent b8051c60a9
commit ddb1021440
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 460 additions and 280 deletions

View file

@ -37,20 +37,17 @@
- [notification.toolkit.fluxcd.io/Receiver/reconcile](https://github.com/argoproj/argo-cd/blob/master/resource_customizations/notification.toolkit.fluxcd.io/Receiver/actions/reconcile/action.lua)
- [notification.toolkit.fluxcd.io/Receiver/resume](https://github.com/argoproj/argo-cd/blob/master/resource_customizations/notification.toolkit.fluxcd.io/Receiver/actions/resume/action.lua)
- [notification.toolkit.fluxcd.io/Receiver/suspend](https://github.com/argoproj/argo-cd/blob/master/resource_customizations/notification.toolkit.fluxcd.io/Receiver/actions/suspend/action.lua)
- [numaflow.numaproj.io/InterStepBufferService/force-promote](https://github.com/argoproj/argo-cd/blob/master/resource_customizations/numaflow.numaproj.io/InterStepBufferService/actions/force-promote/action.lua)
- [numaflow.numaproj.io/MonoVertex/force-promote](https://github.com/argoproj/argo-cd/blob/master/resource_customizations/numaflow.numaproj.io/MonoVertex/actions/force-promote/action.lua)
- [numaflow.numaproj.io/MonoVertex/pause](https://github.com/argoproj/argo-cd/blob/master/resource_customizations/numaflow.numaproj.io/MonoVertex/actions/pause/action.lua)
- [numaflow.numaproj.io/MonoVertex/unpause](https://github.com/argoproj/argo-cd/blob/master/resource_customizations/numaflow.numaproj.io/MonoVertex/actions/unpause/action.lua)
- [numaflow.numaproj.io/Pipeline/force-promote](https://github.com/argoproj/argo-cd/blob/master/resource_customizations/numaflow.numaproj.io/Pipeline/actions/force-promote/action.lua)
- [numaflow.numaproj.io/Pipeline/pause](https://github.com/argoproj/argo-cd/blob/master/resource_customizations/numaflow.numaproj.io/Pipeline/actions/pause/action.lua)
- [numaflow.numaproj.io/Pipeline/unpause](https://github.com/argoproj/argo-cd/blob/master/resource_customizations/numaflow.numaproj.io/Pipeline/actions/unpause/action.lua)
- [numaplane.numaproj.io/ISBServiceRollout/disable-force-promote](https://github.com/argoproj/argo-cd/blob/master/resource_customizations/numaplane.numaproj.io/ISBServiceRollout/actions/disable-force-promote/action.lua)
- [numaplane.numaproj.io/ISBServiceRollout/enable-force-promote](https://github.com/argoproj/argo-cd/blob/master/resource_customizations/numaplane.numaproj.io/ISBServiceRollout/actions/enable-force-promote/action.lua)
- [numaplane.numaproj.io/MonoVertexRollout/disable-force-promote](https://github.com/argoproj/argo-cd/blob/master/resource_customizations/numaplane.numaproj.io/MonoVertexRollout/actions/disable-force-promote/action.lua)
- [numaplane.numaproj.io/MonoVertexRollout/enable-force-promote](https://github.com/argoproj/argo-cd/blob/master/resource_customizations/numaplane.numaproj.io/MonoVertexRollout/actions/enable-force-promote/action.lua)
- [numaplane.numaproj.io/MonoVertexRollout/pause](https://github.com/argoproj/argo-cd/blob/master/resource_customizations/numaplane.numaproj.io/MonoVertexRollout/actions/pause/action.lua)
- [numaplane.numaproj.io/MonoVertexRollout/unpause](https://github.com/argoproj/argo-cd/blob/master/resource_customizations/numaplane.numaproj.io/MonoVertexRollout/actions/unpause/action.lua)
- [numaplane.numaproj.io/PipelineRollout/allow-data-loss](https://github.com/argoproj/argo-cd/blob/master/resource_customizations/numaplane.numaproj.io/PipelineRollout/actions/allow-data-loss/action.lua)
- [numaplane.numaproj.io/PipelineRollout/disable-force-promote](https://github.com/argoproj/argo-cd/blob/master/resource_customizations/numaplane.numaproj.io/PipelineRollout/actions/disable-force-promote/action.lua)
- [numaplane.numaproj.io/PipelineRollout/disallow-data-loss](https://github.com/argoproj/argo-cd/blob/master/resource_customizations/numaplane.numaproj.io/PipelineRollout/actions/disallow-data-loss/action.lua)
- [numaplane.numaproj.io/PipelineRollout/enable-force-promote](https://github.com/argoproj/argo-cd/blob/master/resource_customizations/numaplane.numaproj.io/PipelineRollout/actions/enable-force-promote/action.lua)
- [numaplane.numaproj.io/PipelineRollout/pause](https://github.com/argoproj/argo-cd/blob/master/resource_customizations/numaplane.numaproj.io/PipelineRollout/actions/pause/action.lua)
- [numaplane.numaproj.io/PipelineRollout/unpause](https://github.com/argoproj/argo-cd/blob/master/resource_customizations/numaplane.numaproj.io/PipelineRollout/actions/unpause/action.lua)
- [source.toolkit.fluxcd.io/Bucket/reconcile](https://github.com/argoproj/argo-cd/blob/master/resource_customizations/source.toolkit.fluxcd.io/Bucket/actions/reconcile/action.lua)

View file

@ -0,0 +1,4 @@
actionTests:
- action: force-promote
inputPath: testdata/isbservice.yaml
expectedOutputPath: testdata/isbservice-force-promote.yaml

View file

@ -0,0 +1,18 @@
local actions = {}
actions["force-promote"] = {
["disabled"] = true,
["iconClass"] = "fa-solid fa-fw fa-forward"
}
-- force-promote
local forcePromote = false
if (obj.metadata.labels ~= nil and obj.metadata.labels["numaplane.numaproj.io/upgrade-state"] == "in-progress") then
forcePromote = true
end
if (obj.metadata.labels ~= nil and obj.metadata.labels["numaplane.numaproj.io/force-promote"] == "true") then
forcePromote = false
end
if forcePromote then
actions["force-promote"]["disabled"] = false
else
actions["force-promote"]["disabled"] = true

View file

@ -0,0 +1,5 @@
if obj.metadata.labels == nil then
obj.metadata.labels = {}
end
obj.metadata.labels["numaplane.numaproj.io/force-promote"] = "true"
return obj

View file

@ -0,0 +1,86 @@
apiVersion: numaflow.numaproj.io/v1alpha1
kind: InterStepBufferService
metadata:
creationTimestamp: '2025-04-28T22:39:27Z'
finalizers:
- numaflow.numaproj.io/isbsvc-controller
generation: 1
labels:
numaplane.numaproj.io/force-promote: "true"
numaplane.numaproj.io/parent-rollout-name: my-isbsvc
numaplane.numaproj.io/upgrade-state: "in-progress"
name: my-isbsvc-0
namespace: demo
ownerReferences:
- apiVersion: numaplane.numaproj.io/v1alpha1
blockOwnerDeletion: true
controller: true
kind: ISBServiceRollout
name: my-isbsvc
uid: b38035d8-546a-4f24-b1fa-7bb5b0a3a565
resourceVersion: '1687384'
uid: 889839c6-2982-4b70-b2a5-84afb4272ab6
spec:
jetstream:
persistence:
volumeSize: 1Gi
replicas: 1
version: 2.10.3
status:
conditions:
- lastTransitionTime: '2025-04-28T22:39:57Z'
message: |
partitioned roll out complete: 1 new pods have been updated...
reason: Healthy
status: 'True'
type: ChildrenResourcesHealthy
- lastTransitionTime: '2025-04-28T22:39:57Z'
message: Successful
reason: Successful
status: 'True'
type: Configured
- lastTransitionTime: '2025-04-28T22:39:57Z'
message: Successful
reason: Successful
status: 'True'
type: Deployed
config:
jetstream:
auth:
basic:
password:
key: client-auth-password
name: isbsvc-my-isbsvc-0-js-client-auth
user:
key: client-auth-user
name: isbsvc-my-isbsvc-0-js-client-auth
streamConfig: |
consumer:
ackwait: 60s
maxackpending: 25000
otbucket:
history: 1
maxbytes: 0
maxvaluesize: 0
replicas: 1
storage: 0
ttl: 3h
procbucket:
history: 1
maxbytes: 0
maxvaluesize: 0
replicas: 1
storage: 0
ttl: 72h
stream:
duplicates: 60s
maxage: 72h
maxbytes: -1
maxmsgs: 100000
replicas: 1
retention: 0
storage: 0
url: nats://isbsvc-my-isbsvc-0-js-svc.demo.svc:4222
observedGeneration: 1
phase: Running
type: jetstream

View file

@ -0,0 +1,85 @@
apiVersion: numaflow.numaproj.io/v1alpha1
kind: InterStepBufferService
metadata:
creationTimestamp: '2025-04-28T22:39:27Z'
finalizers:
- numaflow.numaproj.io/isbsvc-controller
generation: 1
labels:
numaplane.numaproj.io/parent-rollout-name: my-isbsvc
numaplane.numaproj.io/upgrade-state: "in-progress"
name: my-isbsvc-0
namespace: demo
ownerReferences:
- apiVersion: numaplane.numaproj.io/v1alpha1
blockOwnerDeletion: true
controller: true
kind: ISBServiceRollout
name: my-isbsvc
uid: b38035d8-546a-4f24-b1fa-7bb5b0a3a565
resourceVersion: '1687384'
uid: 889839c6-2982-4b70-b2a5-84afb4272ab6
spec:
jetstream:
persistence:
volumeSize: 1Gi
replicas: 1
version: 2.10.3
status:
conditions:
- lastTransitionTime: '2025-04-28T22:39:57Z'
message: |
partitioned roll out complete: 1 new pods have been updated...
reason: Healthy
status: 'True'
type: ChildrenResourcesHealthy
- lastTransitionTime: '2025-04-28T22:39:57Z'
message: Successful
reason: Successful
status: 'True'
type: Configured
- lastTransitionTime: '2025-04-28T22:39:57Z'
message: Successful
reason: Successful
status: 'True'
type: Deployed
config:
jetstream:
auth:
basic:
password:
key: client-auth-password
name: isbsvc-my-isbsvc-0-js-client-auth
user:
key: client-auth-user
name: isbsvc-my-isbsvc-0-js-client-auth
streamConfig: |
consumer:
ackwait: 60s
maxackpending: 25000
otbucket:
history: 1
maxbytes: 0
maxvaluesize: 0
replicas: 1
storage: 0
ttl: 3h
procbucket:
history: 1
maxbytes: 0
maxvaluesize: 0
replicas: 1
storage: 0
ttl: 72h
stream:
duplicates: 60s
maxage: 72h
maxbytes: -1
maxmsgs: 100000
replicas: 1
retention: 0
storage: 0
url: nats://isbsvc-my-isbsvc-0-js-svc.demo.svc:4222
observedGeneration: 1
phase: Running
type: jetstream

View file

@ -4,4 +4,7 @@ actionTests:
expectedOutputPath: testdata/monovertex-paused.yaml
- action: unpause
inputPath: testdata/monovertex-paused.yaml
expectedOutputPath: testdata/monovertex.yaml
expectedOutputPath: testdata/monovertex.yaml
- action: force-promote
inputPath: testdata/monovertex.yaml
expectedOutputPath: testdata/monovertex-force-promote.yaml

View file

@ -1,7 +1,18 @@
local actions = {}
actions["pause"] = {["disabled"] = true}
actions["unpause"] = {["disabled"] = true}
actions["pause"] = {
["disabled"] = true,
["iconClass"] = "fa-solid fa-fw fa-pause"
}
actions["unpause"] = {
["disabled"] = true,
["iconClass"] = "fa-solid fa-fw fa-play"
}
actions["force-promote"] = {
["disabled"] = true,
["iconClass"] = "fa-solid fa-fw fa-forward"
}
-- pause/unpause
local paused = false
if obj.spec.lifecycle ~= nil and obj.spec.lifecycle.desiredPhase ~= nil and obj.spec.lifecycle.desiredPhase == "Paused" then
paused = true
@ -10,4 +21,17 @@ if paused then
actions["unpause"]["disabled"] = false
else
actions["pause"]["disabled"] = false
end
end
-- force-promote
local forcePromote = false
if (obj.metadata.labels ~= nil and obj.metadata.labels["numaplane.numaproj.io/upgrade-state"] == "in-progress") then
forcePromote = true
end
if (obj.metadata.labels ~= nil and obj.metadata.labels["numaplane.numaproj.io/force-promote"] == "true") then
forcePromote = false
end
if forcePromote then
actions["force-promote"]["disabled"] = false
else
actions["force-promote"]["disabled"] = true

View file

@ -0,0 +1,5 @@
if obj.metadata.labels == nil then
obj.metadata.labels = {}
end
obj.metadata.labels["numaplane.numaproj.io/force-promote"] = "true"
return obj

View file

@ -0,0 +1,58 @@
apiVersion: numaflow.numaproj.io/v1alpha1
kind: MonoVertex
metadata:
creationTimestamp: "2024-10-09T21:18:37Z"
generation: 1
name: simple-mono-vertex
namespace: numaflow-system
resourceVersion: "1382"
uid: b7b9e4f8-cd4b-4771-9e4b-2880cc50467a
labels:
numaplane.numaproj.io/force-promote: "true"
numaplane.numaproj.io/upgrade-state: "in-progress"
spec:
lifecycle:
desiredPhase: Running
replicas: 1
sink:
udsink:
container:
image: quay.io/numaio/numaflow-java/simple-sink:stable
source:
transformer:
container:
image: quay.io/numaio/numaflow-rs/source-transformer-now:stable
udsource:
container:
image: quay.io/numaio/numaflow-java/source-simple-source:stable
updateStrategy:
rollingUpdate:
maxUnavailable: 25%
type: RollingUpdate
status:
conditions:
- lastTransitionTime: "2024-10-09T21:18:41Z"
message: Successful
reason: Successful
status: "True"
type: DaemonHealthy
- lastTransitionTime: "2024-10-09T21:18:37Z"
message: Successful
reason: Successful
status: "True"
type: Deployed
- lastTransitionTime: "2024-10-09T21:18:37Z"
message: All pods are healthy
reason: Running
status: "True"
type: PodsHealthy
currentHash: 8ed34d9058faa60997ee13083ccb3d80691df37b45a34eaa347af99f237e8df6
desiredReplicas: 1
lastScaledAt: "2024-10-09T21:18:37Z"
lastUpdated: "2024-10-09T21:18:41Z"
observedGeneration: 1
phase: Running
replicas: 1
selector: app.kubernetes.io/component=mono-vertex,numaflow.numaproj.io/mono-vertex-name=simple-mono-vertex
updateHash: 8ed34d9058faa60997ee13083ccb3d80691df37b45a34eaa347af99f237e8df6
updatedReplicas: 1

View file

@ -7,6 +7,8 @@ metadata:
namespace: numaflow-system
resourceVersion: "1382"
uid: b7b9e4f8-cd4b-4771-9e4b-2880cc50467a
labels:
numaplane.numaproj.io/upgrade-state: "in-progress"
spec:
lifecycle:
desiredPhase: Paused

View file

@ -7,6 +7,8 @@ metadata:
namespace: numaflow-system
resourceVersion: "1382"
uid: b7b9e4f8-cd4b-4771-9e4b-2880cc50467a
labels:
numaplane.numaproj.io/upgrade-state: "in-progress"
spec:
lifecycle:
desiredPhase: Running

View file

@ -4,4 +4,7 @@ actionTests:
expectedOutputPath: testdata/pipeline-paused.yaml
- action: unpause
inputPath: testdata/pipeline-paused.yaml
expectedOutputPath: testdata/pipeline.yaml
expectedOutputPath: testdata/pipeline.yaml
- action: force-promote
inputPath: testdata/pipeline.yaml
expectedOutputPath: testdata/pipeline-force-promote.yaml

View file

@ -1,7 +1,18 @@
local actions = {}
actions["pause"] = {["disabled"] = true}
actions["unpause"] = {["disabled"] = true}
actions["pause"] = {
["disabled"] = true,
["iconClass"] = "fa-solid fa-fw fa-pause"
}
actions["unpause"] = {
["disabled"] = true,
["iconClass"] = "fa-solid fa-fw fa-play"
}
actions["force-promote"] = {
["disabled"] = true,
["iconClass"] = "fa-solid fa-fw fa-forward"
}
-- pause/unpause
local paused = false
if obj.spec.lifecycle ~= nil and obj.spec.lifecycle.desiredPhase ~= nil and obj.spec.lifecycle.desiredPhase == "Paused" then
paused = true
@ -10,4 +21,17 @@ if paused then
actions["unpause"]["disabled"] = false
else
actions["pause"]["disabled"] = false
end
end
-- force-promote
local forcePromote = false
if (obj.metadata.labels ~= nil and obj.metadata.labels["numaplane.numaproj.io/upgrade-state"] == "in-progress") then
forcePromote = true
end
if (obj.metadata.labels ~= nil and obj.metadata.labels["numaplane.numaproj.io/force-promote"] == "true") then
forcePromote = false
end
if forcePromote then
actions["force-promote"]["disabled"] = false
else
actions["force-promote"]["disabled"] = true

View file

@ -0,0 +1,5 @@
if obj.metadata.labels == nil then
obj.metadata.labels = {}
end
obj.metadata.labels["numaplane.numaproj.io/force-promote"] = "true"
return obj

View file

@ -0,0 +1,101 @@
apiVersion: numaflow.numaproj.io/v1alpha1
kind: Pipeline
metadata:
creationTimestamp: "2024-10-08T18:22:18Z"
finalizers:
- pipeline-controller
generation: 1
name: simple-pipeline
namespace: numaflow-system
resourceVersion: "382381"
uid: bb6cc91c-eb05-4fe7-9380-63b9532a85db
labels:
numaplane.numaproj.io/force-promote: "true"
numaplane.numaproj.io/upgrade-state: "in-progress"
spec:
edges:
- from: in
to: cat
- from: cat
to: out
lifecycle:
deleteGracePeriodSeconds: 30
desiredPhase: Running
pauseGracePeriodSeconds: 30
limits:
bufferMaxLength: 30000
bufferUsageLimit: 80
readBatchSize: 500
readTimeout: 1s
vertices:
- name: in
scale:
min: 1
source:
generator:
duration: 1s
jitter: 0s
msgSize: 8
rpu: 5
updateStrategy:
rollingUpdate:
maxUnavailable: 25%
type: RollingUpdate
- name: cat
scale:
min: 1
udf:
builtin:
name: cat
updateStrategy:
rollingUpdate:
maxUnavailable: 25%
type: RollingUpdate
- name: out
scale:
min: 1
sink:
log: {}
updateStrategy:
rollingUpdate:
maxUnavailable: 25%
type: RollingUpdate
watermark:
disabled: false
maxDelay: 0s
status:
conditions:
- lastTransitionTime: "2024-10-09T20:26:54Z"
message: Successful
reason: Successful
status: "True"
type: Configured
- lastTransitionTime: "2024-10-09T20:26:54Z"
message: Successful
reason: Successful
status: "True"
type: DaemonServiceHealthy
- lastTransitionTime: "2024-10-09T20:26:54Z"
message: Successful
reason: Successful
status: "True"
type: Deployed
- lastTransitionTime: "2024-10-09T20:26:54Z"
message: No Side Inputs attached to the pipeline
reason: NoSideInputs
status: "True"
type: SideInputsManagersHealthy
- lastTransitionTime: "2024-10-09T20:26:54Z"
message: All vertices are healthy
reason: Successful
status: "True"
type: VerticesHealthy
lastUpdated: "2024-10-09T20:26:54Z"
mapUDFCount: 1
observedGeneration: 1
phase: Running
reduceUDFCount: 0
sinkCount: 1
sourceCount: 1
udfCount: 1
vertexCount: 3

View file

@ -9,6 +9,8 @@ metadata:
namespace: numaflow-system
resourceVersion: "382381"
uid: bb6cc91c-eb05-4fe7-9380-63b9532a85db
labels:
numaplane.numaproj.io/upgrade-state: "in-progress"
spec:
edges:
- from: in

View file

@ -9,6 +9,8 @@ metadata:
namespace: numaflow-system
resourceVersion: "382381"
uid: bb6cc91c-eb05-4fe7-9380-63b9532a85db
labels:
numaplane.numaproj.io/upgrade-state: "in-progress"
spec:
edges:
- from: in

View file

@ -1,7 +0,0 @@
actionTests:
- action: enable-force-promote
inputPath: testdata/ISBServiceRollout/rollout-enable-force-promote.yaml
expectedOutputPath: testdata/ISBServiceRollout/rollout-disable-force-promote.yaml
- action: disable-force-promote
inputPath: testdata/ISBServiceRollout/rollout-disable-force-promote.yaml
expectedOutputPath: testdata/ISBServiceRollout/rollout-enable-force-promote.yaml

View file

@ -1,9 +0,0 @@
if (obj.spec.strategy == nil) then
obj.spec.strategy = {}
obj.spec.strategy.progressive = {}
elseif (obj.spec.strategy.progressive == nil) then
obj.spec.strategy.progressive = {}
end
obj.spec.strategy.progressive.forcePromote = false
return obj

View file

@ -1,19 +0,0 @@
local actions = {}
actions["enable-force-promote"] = {
["disabled"] = true,
["displayName"] = "Enable Force Promote"
}
actions["disable-force-promote"] = {
["disabled"] = true,
["displayName"] = "Disable Force Promote"
}
-- force-promote
if (obj.status ~= nil and obj.status.upgradeInProgress == "Progressive" and obj.status.phase == "Pending") then
actions["enable-force-promote"]["disabled"] = false
end
if (obj.spec ~= nil and obj.spec.strategy ~= nil and obj.spec.strategy.progressive ~= nil and obj.spec.strategy.progressive.forcePromote == true) then
actions["disable-force-promote"]["disabled"] = false
end
return actions

View file

@ -1,9 +0,0 @@
if (obj.spec.strategy == nil) then
obj.spec.strategy = {}
obj.spec.strategy.progressive = {}
elseif (obj.spec.strategy.progressive == nil) then
obj.spec.strategy.progressive = {}
end
obj.spec.strategy.progressive.forcePromote = true
return obj

View file

@ -1,71 +0,0 @@
apiVersion: numaplane.numaproj.io/v1alpha1
kind: ISBServiceRollout
metadata:
creationTimestamp: "2025-02-21T19:43:06Z"
finalizers:
- numaplane.numaproj.io/numaplane-controller
generation: 4
name: test-isbservice-rollout
namespace: numaplane-system
resourceVersion: "6984"
uid: 0c926b94-f7a7-4580-a865-f9dd8d54525f
spec:
strategy:
progressive:
assessmentSchedule: 60,60,10
forcePromote: true
interStepBufferService:
metadata: {}
spec:
jetstream:
containerTemplate:
resources:
limits:
memory: 2Gi
persistence:
volumeSize: 20Mi
version: 2.10.11
status:
conditions:
- lastTransitionTime: "2025-02-21T19:43:06Z"
message: Successful
observedGeneration: 3
reason: Successful
status: "True"
type: ChildResourceDeployed
- lastTransitionTime: "2025-02-21T19:55:13Z"
message: Successful
observedGeneration: 4
reason: Successful
status: "True"
type: ChildResourcesHealthy
- lastTransitionTime: "2025-02-21T19:43:06Z"
message: no need for pause
observedGeneration: 4
reason: NoPause
status: "False"
type: PausingPipelines
- lastTransitionTime: "2025-02-21T19:57:27Z"
message: New Child Object numaplane-system/test-isbservice-rollout-2 Failed
observedGeneration: 4
reason: Failed
status: "False"
type: ProgressiveUpgradeSucceeded
lastFailureTime: "2025-02-21T19:53:30Z"
message: Progressing
nameCount: 3
observedGeneration: 4
pauseRequestStatus:
lastPauseBeginTime: null
lastPauseEndTime: null
lastPausePhaseChangeTime: null
phase: Pending
progressiveStatus:
promotedISBServiceStatus:
name: test-isbservice-rollout-1
upgradingISBServiceStatus:
assessmentEndTime: "2025-02-21T19:58:27Z"
assessmentResult: Failure
assessmentStartTime: "2025-02-21T19:57:05Z"
name: test-isbservice-rollout-2
upgradeInProgress: Progressive

View file

@ -1,71 +0,0 @@
apiVersion: numaplane.numaproj.io/v1alpha1
kind: ISBServiceRollout
metadata:
creationTimestamp: "2025-02-21T19:43:06Z"
finalizers:
- numaplane.numaproj.io/numaplane-controller
generation: 4
name: test-isbservice-rollout
namespace: numaplane-system
resourceVersion: "6984"
uid: 0c926b94-f7a7-4580-a865-f9dd8d54525f
spec:
strategy:
progressive:
assessmentSchedule: 60,60,10
forcePromote: false
interStepBufferService:
metadata: {}
spec:
jetstream:
containerTemplate:
resources:
limits:
memory: 2Gi
persistence:
volumeSize: 20Mi
version: 2.10.11
status:
conditions:
- lastTransitionTime: "2025-02-21T19:43:06Z"
message: Successful
observedGeneration: 3
reason: Successful
status: "True"
type: ChildResourceDeployed
- lastTransitionTime: "2025-02-21T19:55:13Z"
message: Successful
observedGeneration: 4
reason: Successful
status: "True"
type: ChildResourcesHealthy
- lastTransitionTime: "2025-02-21T19:43:06Z"
message: no need for pause
observedGeneration: 4
reason: NoPause
status: "False"
type: PausingPipelines
- lastTransitionTime: "2025-02-21T19:57:27Z"
message: New Child Object numaplane-system/test-isbservice-rollout-2 Failed
observedGeneration: 4
reason: Failed
status: "False"
type: ProgressiveUpgradeSucceeded
lastFailureTime: "2025-02-21T19:53:30Z"
message: Progressing
nameCount: 3
observedGeneration: 4
pauseRequestStatus:
lastPauseBeginTime: null
lastPauseEndTime: null
lastPausePhaseChangeTime: null
phase: Pending
progressiveStatus:
promotedISBServiceStatus:
name: test-isbservice-rollout-1
upgradingISBServiceStatus:
assessmentEndTime: "2025-02-21T19:58:27Z"
assessmentResult: Failure
assessmentStartTime: "2025-02-21T19:57:05Z"
name: test-isbservice-rollout-2
upgradeInProgress: Progressive

View file

@ -4,10 +4,4 @@ actionTests:
expectedOutputPath: testdata/MonoVertexRollout/rollout-paused.yaml
- action: unpause
inputPath: testdata/MonoVertexRollout/rollout-paused.yaml
expectedOutputPath: testdata/MonoVertexRollout/rollout-running.yaml
- action: enable-force-promote
inputPath: testdata/MonoVertexRollout/rollout-enable-force-promote.yaml
expectedOutputPath: testdata/MonoVertexRollout/rollout-disable-force-promote.yaml
- action: disable-force-promote
inputPath: testdata/MonoVertexRollout/rollout-disable-force-promote.yaml
expectedOutputPath: testdata/MonoVertexRollout/rollout-enable-force-promote.yaml
expectedOutputPath: testdata/MonoVertexRollout/rollout-running.yaml

View file

@ -1,9 +0,0 @@
if (obj.spec.strategy == nil) then
obj.spec.strategy = {}
obj.spec.strategy.progressive = {}
elseif (obj.spec.strategy.progressive == nil) then
obj.spec.strategy.progressive = {}
end
obj.spec.strategy.progressive.forcePromote = false
return obj

View file

@ -1,13 +1,11 @@
local actions = {}
actions["pause"] = {["disabled"] = true}
actions["unpause"] = {["disabled"] = true}
actions["enable-force-promote"] = {
actions["pause"] = {
["disabled"] = true,
["displayName"] = "Enable Force Promote"
["iconClass"] = "fa-solid fa-fw fa-pause"
}
actions["disable-force-promote"] = {
actions["unpause"] = {
["disabled"] = true,
["displayName"] = "Disable Force Promote"
["iconClass"] = "fa-solid fa-fw fa-play"
}
-- pause/unpause
@ -21,12 +19,4 @@ else
actions["pause"]["disabled"] = false
end
-- force-promote
if (obj.status ~= nil and obj.status.upgradeInProgress == "Progressive" and obj.status.phase == "Pending") then
actions["enable-force-promote"]["disabled"] = false
end
if (obj.spec ~= nil and obj.spec.strategy ~= nil and obj.spec.strategy.progressive ~= nil and obj.spec.strategy.progressive.forcePromote == true) then
actions["disable-force-promote"]["disabled"] = false
end
return actions

View file

@ -1,9 +0,0 @@
if (obj.spec.strategy == nil) then
obj.spec.strategy = {}
obj.spec.strategy.progressive = {}
elseif (obj.spec.strategy.progressive == nil) then
obj.spec.strategy.progressive = {}
end
obj.spec.strategy.progressive.forcePromote = true
return obj

View file

@ -10,10 +10,4 @@ actionTests:
expectedOutputPath: testdata/PipelineRollout/rollout-allowing-data-loss.yaml
- action: disallow-data-loss
inputPath: testdata/PipelineRollout/rollout-allowing-data-loss.yaml
expectedOutputPath: testdata/PipelineRollout/rollout-disallowing-data-loss.yaml
- action: enable-force-promote
inputPath: testdata/PipelineRollout/rollout-enable-force-promote.yaml
expectedOutputPath: testdata/PipelineRollout/rollout-disable-force-promote.yaml
- action: disable-force-promote
inputPath: testdata/PipelineRollout/rollout-disable-force-promote.yaml
expectedOutputPath: testdata/PipelineRollout/rollout-enable-force-promote.yaml
expectedOutputPath: testdata/PipelineRollout/rollout-disallowing-data-loss.yaml

View file

@ -1,9 +0,0 @@
if (obj.spec.strategy == nil) then
obj.spec.strategy = {}
obj.spec.strategy.progressive = {}
elseif (obj.spec.strategy.progressive == nil) then
obj.spec.strategy.progressive = {}
end
obj.spec.strategy.progressive.forcePromote = false
return obj

View file

@ -1,15 +1,21 @@
local actions = {}
actions["pause"] = {["disabled"] = true}
actions["unpause"] = {["disabled"] = true}
actions["allow-data-loss"] = {["disabled"] = true}
actions["disallow-data-loss"] = {["disabled"] = true}
actions["enable-force-promote"] = {
actions["pause"] = {
["disabled"] = true,
["displayName"] = "Enable Force Promote"
["iconClass"] = "fa-solid fa-fw fa-pause"
}
actions["disable-force-promote"] = {
actions["unpause"] = {
["disabled"] = true,
["displayName"] = "Disable Force Promote"
["iconClass"] = "fa-solid fa-fw fa-play"
}
actions["allow-data-loss"] = {
["disabled"] = true,
["displayName"] = "Allow Data Loss",
["iconClass"] = "fa-solid fa-fw fa-unlock"
}
actions["disallow-data-loss"] = {
["disabled"] = true,
["displayName"] = "Disallow Data Loss",
["iconClass"] = "fa-solid fa-fw fa-lock"
}
-- pause/unpause
@ -31,12 +37,4 @@ if obj.metadata.annotations ~= nil and obj.metadata.annotations["numaplane.numap
actions["disallow-data-loss"]["disabled"] = false
end
-- force-promote
if (obj.status ~= nil and obj.status.upgradeInProgress == "Progressive" and obj.status.phase == "Pending") then
actions["enable-force-promote"]["disabled"] = false
end
if (obj.spec ~= nil and obj.spec.strategy ~= nil and obj.spec.strategy.progressive ~= nil and obj.spec.strategy.progressive.forcePromote == true) then
actions["disable-force-promote"]["disabled"] = false
end
return actions

View file

@ -1,9 +0,0 @@
if (obj.spec.strategy == nil) then
obj.spec.strategy = {}
obj.spec.strategy.progressive = {}
elseif (obj.spec.strategy.progressive == nil) then
obj.spec.strategy.progressive = {}
end
obj.spec.strategy.progressive.forcePromote = true
return obj