diff options
author | Tiger <twatson@gitlab.com> | 2019-05-17 01:49:12 +0300 |
---|---|---|
committer | Tiger <twatson@gitlab.com> | 2019-05-21 19:38:11 +0300 |
commit | 101c4480b32044682e453753c6bb18c2a296b044 (patch) | |
tree | 46b6ac3df55c748a6854bdb5c02a696228a7e9fc /spec/lib/gitlab/prometheus | |
parent | 0702d4b6899648ba12a747824f3db86c2f4aa42e (diff) |
Remove legacy Kubernetes #actual_namespace
When Kubernetes clusters were originally built they could only
exist at the project level, and so there was logic included
that assumed there would only ever be a single Kubernetes
namespace per cluster. We now support clusters at the group
and instance level, which allows multiple namespaces.
This change consolidates various project-specific fallbacks to
generate namespaces, and hands all responsibility to the
Clusters::KubernetesNamespace model. There is now no concept of
a single namespace for a Clusters::Platforms::Kubernetes; to
retrieve a namespace a project must now be supplied in all cases.
This simplifies upcoming work to use a separate Kubernetes
namespace per project environment (instead of a namespace
per project).
Diffstat (limited to 'spec/lib/gitlab/prometheus')
-rw-r--r-- | spec/lib/gitlab/prometheus/query_variables_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/lib/gitlab/prometheus/query_variables_spec.rb b/spec/lib/gitlab/prometheus/query_variables_spec.rb index 048f4af6020..6dc99ef26ec 100644 --- a/spec/lib/gitlab/prometheus/query_variables_spec.rb +++ b/spec/lib/gitlab/prometheus/query_variables_spec.rb @@ -23,7 +23,7 @@ describe Gitlab::Prometheus::QueryVariables do context 'with deployment platform' do context 'with project cluster' do - let(:kube_namespace) { environment.deployment_platform.actual_namespace } + let(:kube_namespace) { environment.deployment_platform.cluster.kubernetes_namespace_for(project) } before do create(:cluster, :project, :provided_by_user, projects: [project]) |