From ae4966f29a928212ce54e548a48098456b374336 Mon Sep 17 00:00:00 2001 From: Thong Kuah Date: Fri, 21 Jun 2019 20:45:06 +0000 Subject: 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. --- lib/gitlab/kubernetes.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib') 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", {}) -- cgit v1.2.1