summaryrefslogtreecommitdiff
path: root/app/models/clusters/applications
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/clusters/applications')
-rw-r--r--app/models/clusters/applications/cilium.rb21
-rw-r--r--app/models/clusters/applications/prometheus.rb3
-rw-r--r--app/models/clusters/applications/runner.rb2
3 files changed, 25 insertions, 1 deletions
diff --git a/app/models/clusters/applications/cilium.rb b/app/models/clusters/applications/cilium.rb
new file mode 100644
index 00000000000..7936b0b18de
--- /dev/null
+++ b/app/models/clusters/applications/cilium.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+module Clusters
+ module Applications
+ class Cilium < ApplicationRecord
+ self.table_name = 'clusters_applications_cilium'
+
+ include ::Clusters::Concerns::ApplicationCore
+ include ::Clusters::Concerns::ApplicationStatus
+
+ # Cilium can only be installed and uninstalled through the
+ # cluster-applications project by triggering CI pipeline for a
+ # management project. UI operations are not available for such
+ # applications. More information:
+ # https://docs.gitlab.com/ee/user/clusters/management_project.html
+ def allowed_to_uninstall?
+ false
+ end
+ end
+ end
+end
diff --git a/app/models/clusters/applications/prometheus.rb b/app/models/clusters/applications/prometheus.rb
index 24bb1df6d22..101d782db3a 100644
--- a/app/models/clusters/applications/prometheus.rb
+++ b/app/models/clusters/applications/prometheus.rb
@@ -17,6 +17,9 @@ module Clusters
default_value_for :version, VERSION
+ scope :preload_cluster_platform, -> { preload(cluster: [:platform_kubernetes]) }
+ scope :with_clusters_with_cilium, -> { joins(:cluster).merge(Clusters::Cluster.with_available_cilium) }
+
attr_encrypted :alert_manager_token,
mode: :per_attribute_iv,
key: Settings.attr_encrypted_db_key_base_truncated,
diff --git a/app/models/clusters/applications/runner.rb b/app/models/clusters/applications/runner.rb
index 6d3b6c4ed8f..9ec7c194a26 100644
--- a/app/models/clusters/applications/runner.rb
+++ b/app/models/clusters/applications/runner.rb
@@ -3,7 +3,7 @@
module Clusters
module Applications
class Runner < ApplicationRecord
- VERSION = '0.17.1'
+ VERSION = '0.18.1'
self.table_name = 'clusters_applications_runners'