Skip to content

Commit e830f5d

Browse files
authored
Add Suspended status to Rollout health script (argoproj#1203)
1 parent a848090 commit e830f5d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

resource_customizations/argoproj.io/Rollout/health.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ if obj.status ~= nil then
1919
if obj.status.verifyingPreview ~= nil then
2020
verifyingPreview = obj.status.verifyingPreview
2121
end
22-
if verifyingPreview and obj.status.previewSelector ~= nil and obj.status.previewSelector == obj.status.currentPodHash then
23-
hs.status = "Healthy"
22+
if verifyingPreview and obj.status.blueGreenStatus.previewSelector ~= nil and obj.status.blueGreenStatus.previewSelector == obj.status.currentPodHash then
23+
hs.status = "Suspended"
2424
hs.message = "The preview Service is serving traffic to the current pod spec"
2525
return hs
2626
end
@@ -36,7 +36,7 @@ if obj.status ~= nil then
3636
return hs
3737
end
3838

39-
if obj.status.activeSelector ~= nil and obj.status.activeSelector == obj.status.currentPodHash then
39+
if obj.status.blueGreenStatus.activeSelector ~= nil and obj.status.blueGreenStatus.activeSelector == obj.status.currentPodHash then
4040
hs.status = "Healthy"
4141
hs.message = "The active Service is serving traffic to the current pod spec"
4242
return hs

resource_customizations/argoproj.io/Rollout/health_test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ tests:
44
message: The active Service is serving traffic to the current pod spec
55
inputPath: testdata/healthy_servingActiveService.yaml
66
- healthStatus:
7-
status: Healthy
7+
status: Suspended
88
message: The preview Service is serving traffic to the current pod spec
99
inputPath: testdata/healthy_servingPreviewService.yaml
1010
- healthStatus:

0 commit comments

Comments
 (0)