summaryrefslogtreecommitdiff
path: root/app/models/clusters/cluster.rb
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-11-06 10:41:27 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2017-11-06 10:41:27 +0100
commitd8223468ae2ae061020cc26336c51dc93cc75571 (patch)
tree9855fdb31d017c1501703f46a8c3965cbf0ed180 /app/models/clusters/cluster.rb
parent3a174c999dfb61f2dde53f6eb7b2baec8b5e3683 (diff)
downloadgitlab-ce-d8223468ae2ae061020cc26336c51dc93cc75571.tar.gz
Add ingress application
Diffstat (limited to 'app/models/clusters/cluster.rb')
-rw-r--r--app/models/clusters/cluster.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/models/clusters/cluster.rb b/app/models/clusters/cluster.rb
index 7d0be3d3739..cfed9c52860 100644
--- a/app/models/clusters/cluster.rb
+++ b/app/models/clusters/cluster.rb
@@ -5,7 +5,8 @@ module Clusters
self.table_name = 'clusters'
APPLICATIONS = {
- Applications::Helm.application_name => Applications::Helm
+ Applications::Helm.application_name => Applications::Helm,
+ Applications::Ingress.application_name => Applications::Ingress
}.freeze
belongs_to :user
@@ -20,6 +21,7 @@ module Clusters
has_one :platform_kubernetes, class_name: 'Clusters::Platforms::Kubernetes', autosave: true, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent
has_one :application_helm, class_name: 'Clusters::Applications::Helm'
+ has_one :application_ingress, class_name: 'Clusters::Applications::Ingress'
accepts_nested_attributes_for :provider_gcp, update_only: true
accepts_nested_attributes_for :platform_kubernetes, update_only: true
@@ -59,7 +61,8 @@ module Clusters
def applications
[
- application_helm || build_application_helm
+ application_helm || build_application_helm,
+ application_ingress || build_application_ingress
]
end