Add Suspended status to Rollout health script (#1203)

This commit is contained in:
dthomson25 2019-03-01 10:54:57 -08:00 committed by GitHub
parent a848090014
commit e830f5d4e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -19,8 +19,8 @@ if obj.status ~= nil then
if obj.status.verifyingPreview ~= nil then
verifyingPreview = obj.status.verifyingPreview
end
if verifyingPreview and obj.status.previewSelector ~= nil and obj.status.previewSelector == obj.status.currentPodHash then
hs.status = "Healthy"
if verifyingPreview and obj.status.blueGreenStatus.previewSelector ~= nil and obj.status.blueGreenStatus.previewSelector == obj.status.currentPodHash then
hs.status = "Suspended"
hs.message = "The preview Service is serving traffic to the current pod spec"
return hs
end
@ -36,7 +36,7 @@ if obj.status ~= nil then
return hs
end
if obj.status.activeSelector ~= nil and obj.status.activeSelector == obj.status.currentPodHash then
if obj.status.blueGreenStatus.activeSelector ~= nil and obj.status.blueGreenStatus.activeSelector == obj.status.currentPodHash then
hs.status = "Healthy"
hs.message = "The active Service is serving traffic to the current pod spec"
return hs

View file

@ -4,7 +4,7 @@ tests:
message: The active Service is serving traffic to the current pod spec
inputPath: testdata/healthy_servingActiveService.yaml
- healthStatus:
status: Healthy
status: Suspended
message: The preview Service is serving traffic to the current pod spec
inputPath: testdata/healthy_servingPreviewService.yaml
- healthStatus: