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:
authorTiger Watson <twatson@gitlab.com>2019-08-07 07:40:29 +0300
committerThong Kuah <tkuah@gitlab.com>2019-08-07 07:40:29 +0300
commit36a01a88ce4c35f3d2b455c7943eeb9649b51163 (patch)
treee568be9b9b80626b60f8e0e445ea95ee570e9523 /lib/gitlab/prometheus
parent54377159730c676bd40b64e66acfb57faf90eabf (diff)
Use separate Kubernetes namespaces per environment
Kubernetes deployments on new clusters will now have a separate namespace per project environment, instead of sharing a single namespace for the project. Behaviour of existing clusters is unchanged. All new functionality is controlled by the :kubernetes_namespace_per_environment feature flag, which is safe to enable/disable at any time.
Diffstat (limited to 'lib/gitlab/prometheus')
-rw-r--r--lib/gitlab/prometheus/query_variables.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/gitlab/prometheus/query_variables.rb b/lib/gitlab/prometheus/query_variables.rb
index 9cc21129547..ba2d33ee1c1 100644
--- a/lib/gitlab/prometheus/query_variables.rb
+++ b/lib/gitlab/prometheus/query_variables.rb
@@ -4,12 +4,9 @@ module Gitlab
module Prometheus
module QueryVariables
def self.call(environment)
- deployment_platform = environment.deployment_platform
- namespace = deployment_platform&.kubernetes_namespace_for(environment.project) || ''
-
{
ci_environment_slug: environment.slug,
- kube_namespace: namespace,
+ kube_namespace: environment.deployment_namespace || '',
environment_filter: %{container_name!="POD",environment="#{environment.slug}"}
}
end