diff options
author | James Fargher <proglottis@gmail.com> | 2019-03-21 11:06:47 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-03-21 11:06:47 +0300 |
commit | 01aa1ef77beee21a588f8b6b27bd372fc7ed7c8d (patch) | |
tree | aa7054c30e2b4172d0d0d2b18ec9d09e064f3e92 /app | |
parent | 6a0702fe9382c2b3c4a72421054d46821a95c781 (diff) |
Update dashboards to additionally use new environment selector
Deploy boards now will check for app.gitlab.com/env and
app.gitlab.com/app
Diffstat (limited to 'app')
-rw-r--r-- | app/models/clusters/platforms/kubernetes.rb | 2 | ||||
-rw-r--r-- | app/models/project_services/kubernetes_service.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/models/clusters/platforms/kubernetes.rb b/app/models/clusters/platforms/kubernetes.rb index fb2221b601f..7786b48429c 100644 --- a/app/models/clusters/platforms/kubernetes.rb +++ b/app/models/clusters/platforms/kubernetes.rb @@ -110,7 +110,7 @@ module Clusters # short time later def terminals(environment) with_reactive_cache do |data| - pods = filter_by_label(data[:pods], app: environment.slug) + pods = filter_by_project_environment(data[:pods], project.full_path_slug, environment.slug) terminals = pods.flat_map { |pod| terminals_for_pod(api_url, actual_namespace, pod) }.compact terminals.each { |terminal| add_terminal_auth(terminal, terminal_auth) } end diff --git a/app/models/project_services/kubernetes_service.rb b/app/models/project_services/kubernetes_service.rb index 4cf3a7f3d84..f650dbd3726 100644 --- a/app/models/project_services/kubernetes_service.rb +++ b/app/models/project_services/kubernetes_service.rb @@ -131,8 +131,8 @@ class KubernetesService < DeploymentService # short time later def terminals(environment) with_reactive_cache do |data| - pods = filter_by_label(data[:pods], app: environment.slug) - terminals = pods.flat_map { |pod| terminals_for_pod(api_url, actual_namespace, pod) } + pods = filter_by_project_environment(data[:pods], project.full_path_slug, environment.slug) + terminals = pods.flat_map { |pod| terminals_for_pod(api_url, actual_namespace, pod) }.compact terminals.each { |terminal| add_terminal_auth(terminal, terminal_auth) } end end |