diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-11-06 10:41:27 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-11-06 10:41:27 +0100 |
commit | d8223468ae2ae061020cc26336c51dc93cc75571 (patch) | |
tree | 9855fdb31d017c1501703f46a8c3965cbf0ed180 /app/models/clusters/applications | |
parent | 3a174c999dfb61f2dde53f6eb7b2baec8b5e3683 (diff) | |
download | gitlab-ce-d8223468ae2ae061020cc26336c51dc93cc75571.tar.gz |
Add ingress application
Diffstat (limited to 'app/models/clusters/applications')
-rw-r--r-- | app/models/clusters/applications/ingress.rb | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/app/models/clusters/applications/ingress.rb b/app/models/clusters/applications/ingress.rb new file mode 100644 index 00000000000..0554cf84ed7 --- /dev/null +++ b/app/models/clusters/applications/ingress.rb @@ -0,0 +1,32 @@ +module Clusters + module Applications + class Ingress < ActiveRecord::Base + self.table_name = 'clusters_applications_ingress' + + include ::Clusters::Concerns::ApplicationStatus + + belongs_to :cluster, class_name: 'Clusters::Cluster', foreign_key: :cluster_id + + validates :cluster, presence: true + + default_value_for :ingress_type, :nginx + default_value_for :version, :nginx + + enum ingress_type: { + nginx: 1 + } + + def self.application_name + self.to_s.demodulize.underscore + end + + def name + self.class.application_name + end + + def chart + 'stable/nginx-ingress' + end + end + end +end |