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-07 09:39:04 +0300
committerThong Kuah <tkuah@gitlab.com>2019-06-19 02:06:43 +0300
commit04608acf03d72ad096ac44e5fd4949205d30a347 (patch)
treeb1e06954116ba3ac66f99358d5a9a7272cd50f09 /lib/gitlab/kubernetes.rb
parent6fa900547dbd30b0db0070f87dbeb4b05d485b9b (diff)
Stop matching on legacy app label
From now on, only match on the annotations, instead of falling back to legacy app label. This enables users to use the app label for other purposes such as helm charts.
Diffstat (limited to 'lib/gitlab/kubernetes.rb')
-rw-r--r--lib/gitlab/kubernetes.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/gitlab/kubernetes.rb b/lib/gitlab/kubernetes.rb
index d46b5e3aee3..1103a4eed1d 100644
--- a/lib/gitlab/kubernetes.rb
+++ b/lib/gitlab/kubernetes.rb
@@ -37,15 +37,10 @@ module Gitlab
# Filters an array of pods (as returned by the kubernetes API) by their project and environment
def filter_by_project_environment(items, app, env)
- pods = filter_by_annotation(items, {
+ filter_by_annotation(items, {
'app.gitlab.com/app' => app,
'app.gitlab.com/env' => env
})
- return pods unless pods.empty?
-
- filter_by_label(items, {
- 'app' => env, # deprecated: replaced by app.gitlab.com/env
- })
end
# Converts a pod (as returned by the kubernetes API) into a terminal