BigW Consortium Gitlab

helm.rb 598 Bytes
Newer Older
1
module Clusters
2 3 4 5
  module Applications
    class Helm < ActiveRecord::Base
      self.table_name = 'clusters_applications_helm'

6
      include ::Clusters::Concerns::ApplicationCore
7
      include ::Clusters::Concerns::ApplicationStatus
8

Alessio Caiazza committed
9
      default_value_for :version, Gitlab::Kubernetes::Helm::HELM_VERSION
10

11
      def set_initial_status
12 13
        return unless not_installable?

14
        self.status = 'installable' if cluster&.platform_kubernetes_active?
15 16
      end

17
      def install_command
18
        Gitlab::Kubernetes::Helm::InstallCommand.new(name, install_helm: true)
19
      end
20 21 22
    end
  end
end