diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2019-04-30 13:31:47 +0000 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2019-04-30 13:31:47 +0000 |
commit | 56c8b35b8460dac53e6d29c3c811da4e57eca66c (patch) | |
tree | 566efb71c8385a474c8ca08e4401a2782067557e /app/models/clusters | |
parent | ac2c2be97f1a0647630646ebf1e25f9bb0fb5ac9 (diff) | |
parent | b389ef66d46219abbd671bcdbdfdd2fb142798b8 (diff) | |
download | gitlab-ce-56c8b35b8460dac53e6d29c3c811da4e57eca66c.tar.gz |
Merge branch 'pl-fix-k8s-ns-query-variables' into 'master'
Use correct k8s namespace in Prometheus queries
See merge request gitlab-org/gitlab-ce!27812
Diffstat (limited to 'app/models/clusters')
-rw-r--r-- | app/models/clusters/platforms/kubernetes.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/clusters/platforms/kubernetes.rb b/app/models/clusters/platforms/kubernetes.rb index a806367a49b..ca7d109d4f0 100644 --- a/app/models/clusters/platforms/kubernetes.rb +++ b/app/models/clusters/platforms/kubernetes.rb @@ -76,6 +76,10 @@ module Clusters end end + def namespace_for(project) + cluster.find_or_initialize_kubernetes_namespace_for_project(project).namespace + end + def predefined_variables(project:) Gitlab::Ci::Variables::Collection.new.tap do |variables| variables.append(key: 'KUBE_URL', value: api_url) |