Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2019-06-21 23:45:06 +0300
committerMike Greiling <mike@pixelcog.com>2019-06-21 23:45:06 +0300
commitae4966f29a928212ce54e548a48098456b374336 (patch)
tree8e33959e3f1f291a31fb6c20f0d912be0880a967 /lib/gitlab/kubernetes.rb
parentc6f54ab12b5b276dadda0639ea647e9a2b4c1781 (diff)
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/gitlab/kubernetes.rb')
-rw-r--r--lib/gitlab/kubernetes.rb8
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", {})