Commit 53f8fecd authored by Kamil Trzcinski's avatar Kamil Trzcinski

Read track from deployment and visualise canary deployments

parent 81883a09
---
title: Visualise Canary Deployments
merge_request:
author:
......@@ -13,6 +13,18 @@ module Gitlab
metadata['labels']
end
def track
labels.fetch('track', 'stable')
end
def stable?
track.nil? || track == 'stable'
end
def canary?
!stable?
end
def outdated?
observed_generation < generation
end
......@@ -52,7 +64,13 @@ module Gitlab
end
def deployment_instance(n, name, status)
{ status: status, tooltip: "#{name} (pod #{n}) #{status.capitalize}" }
{
status: status,
tooltip: "#{name} (pod #{n}) #{status.capitalize}",
track: track,
canary: canary?,
stable: stable?
}
end
def metadata
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment