From 0d4548026f3060ca0a8f7aa8d8fc89838bc66130 Mon Sep 17 00:00:00 2001 From: Mayra Cabrera Date: Fri, 22 Dec 2017 17:23:43 +0000 Subject: Extend Cluster Applications to allow installation of Prometheus --- app/models/clusters/cluster.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/models/clusters/cluster.rb') diff --git a/app/models/clusters/cluster.rb b/app/models/clusters/cluster.rb index 55419189282..5ecbd4cbceb 100644 --- a/app/models/clusters/cluster.rb +++ b/app/models/clusters/cluster.rb @@ -6,7 +6,8 @@ module Clusters APPLICATIONS = { Applications::Helm.application_name => Applications::Helm, - Applications::Ingress.application_name => Applications::Ingress + Applications::Ingress.application_name => Applications::Ingress, + Applications::Prometheus.application_name => Applications::Prometheus }.freeze belongs_to :user @@ -21,6 +22,7 @@ module Clusters has_one :application_helm, class_name: 'Clusters::Applications::Helm' has_one :application_ingress, class_name: 'Clusters::Applications::Ingress' + has_one :application_prometheus, class_name: 'Clusters::Applications::Prometheus' accepts_nested_attributes_for :provider_gcp, update_only: true accepts_nested_attributes_for :platform_kubernetes, update_only: true @@ -62,7 +64,8 @@ module Clusters def applications [ application_helm || build_application_helm, - application_ingress || build_application_ingress + application_ingress || build_application_ingress, + application_prometheus || build_application_prometheus ] end -- cgit v1.2.1