diff options
author | Thong Kuah <tkuah@gitlab.com> | 2019-06-21 20:45:06 +0000 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2019-06-21 20:45:06 +0000 |
commit | ae4966f29a928212ce54e548a48098456b374336 (patch) | |
tree | 8e33959e3f1f291a31fb6c20f0d912be0880a967 /lib | |
parent | c6f54ab12b5b276dadda0639ea647e9a2b4c1781 (diff) | |
download | gitlab-ce-ae4966f29a928212ce54e548a48098456b374336.tar.gz |
Select deployments that only has the app label
As Auto DevOps deployments both label and annotations, that will be
included in the deploy board so need to warn at all.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/kubernetes.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/gitlab/kubernetes.rb b/lib/gitlab/kubernetes.rb index 1103a4eed1d..22bd00751bc 100644 --- a/lib/gitlab/kubernetes.rb +++ b/lib/gitlab/kubernetes.rb @@ -43,6 +43,14 @@ module Gitlab }) end + def filter_by_legacy_label(items, app, env) + legacy_items = filter_by_label(items, { app: env }) + + non_legacy_items = filter_by_project_environment(legacy_items, app, env) + + legacy_items - non_legacy_items + end + # Converts a pod (as returned by the kubernetes API) into a terminal def terminals_for_pod(api_url, namespace, pod) metadata = pod.fetch("metadata", {}) |