debian-mirror-gitlab/app/models/clusters/applications/crossplane.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

62 lines
1.3 KiB
Ruby
Raw Normal View History

2019-12-26 22:10:19 +05:30
# frozen_string_literal: true
module Clusters
module Applications
2021-03-11 19:13:27 +05:30
# DEPRECATED for removal in %14.0
# See https://gitlab.com/groups/gitlab-org/-/epics/4280
2019-12-26 22:10:19 +05:30
class Crossplane < ApplicationRecord
VERSION = '0.4.1'
self.table_name = 'clusters_applications_crossplane'
include ::Clusters::Concerns::ApplicationCore
include ::Clusters::Concerns::ApplicationStatus
include ::Clusters::Concerns::ApplicationVersion
include ::Clusters::Concerns::ApplicationData
default_value_for :version, VERSION
default_value_for :stack do |crossplane|
''
end
validates :stack, presence: true
def chart
'crossplane/crossplane'
end
def repository
'https://charts.crossplane.io/alpha'
end
def install_command
2021-01-29 00:20:46 +05:30
helm_command_module::InstallCommand.new(
2019-12-26 22:10:19 +05:30
name: 'crossplane',
repository: repository,
version: VERSION,
rbac: cluster.platform_kubernetes_rbac?,
chart: chart,
2020-10-24 23:57:45 +05:30
files: files
2019-12-26 22:10:19 +05:30
)
end
def values
crossplane_values.to_yaml
end
private
def crossplane_values
{
"clusterStacks" => {
self.stack => {
2020-04-08 14:13:33 +05:30
"deploy" => true
2019-12-26 22:10:19 +05:30
}
}
}
end
end
end
end