diff options
author | Thong Kuah <tkuah@gitlab.com> | 2018-11-23 06:28:16 +0300 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2018-12-05 00:16:44 +0300 |
commit | 703233e1e9ce8572740b7f22ea62b2a59015e564 (patch) | |
tree | a1f61dbe93f687c8cade68cefd85f91a1e6e359f | |
parent | e9eccee9ae7be13f73b61f24d4cc6b52af997464 (diff) |
Add association project -> kubernetes_namespaces
kubernetes_namespaces is not needed for project import/export as it
tracks internal state of kubernetes integration
-rw-r--r-- | app/models/project.rb | 1 | ||||
-rw-r--r-- | spec/lib/gitlab/import_export/all_models.yml | 1 | ||||
-rw-r--r-- | spec/models/project_spec.rb | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 1c5c34111b0..20e3ada9eb8 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -238,6 +238,7 @@ class Project < ActiveRecord::Base has_one :cluster_project, class_name: 'Clusters::Project' has_many :clusters, through: :cluster_project, class_name: 'Clusters::Cluster' has_many :cluster_ingresses, through: :clusters, source: :application_ingress, class_name: 'Clusters::Applications::Ingress' + has_many :kubernetes_namespaces, class_name: 'Clusters::KubernetesNamespace' has_many :prometheus_metrics diff --git a/spec/lib/gitlab/import_export/all_models.yml b/spec/lib/gitlab/import_export/all_models.yml index 31ab11bbf8d..aacd23e7bce 100644 --- a/spec/lib/gitlab/import_export/all_models.yml +++ b/spec/lib/gitlab/import_export/all_models.yml @@ -304,6 +304,7 @@ project: - import_export_upload - repository_languages - pool_repository +- kubernetes_namespaces award_emoji: - awardable - user diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 3f99fd12e38..edb9ff4e734 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -87,6 +87,7 @@ describe Project do it { is_expected.to have_many(:pipeline_schedules) } it { is_expected.to have_many(:members_and_requesters) } it { is_expected.to have_many(:clusters) } + it { is_expected.to have_many(:kubernetes_namespaces) } it { is_expected.to have_many(:custom_attributes).class_name('ProjectCustomAttribute') } it { is_expected.to have_many(:project_badges).class_name('ProjectBadge') } it { is_expected.to have_many(:lfs_file_locks) } |