summaryrefslogtreecommitdiff
path: root/app/models/clusters
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/clusters')
-rw-r--r--app/models/clusters/agent.rb2
-rw-r--r--app/models/clusters/applications/prometheus.rb6
-rw-r--r--app/models/clusters/applications/runner.rb2
-rw-r--r--app/models/clusters/cluster.rb1
-rw-r--r--app/models/clusters/instance.rb2
-rw-r--r--app/models/clusters/providers/aws.rb2
6 files changed, 10 insertions, 5 deletions
diff --git a/app/models/clusters/agent.rb b/app/models/clusters/agent.rb
index c21759a3c3b..874415e7bf4 100644
--- a/app/models/clusters/agent.rb
+++ b/app/models/clusters/agent.rb
@@ -8,6 +8,8 @@ module Clusters
has_many :agent_tokens, class_name: 'Clusters::AgentToken'
+ scope :with_name, -> (name) { where(name: name) }
+
validates :name,
presence: true,
length: { maximum: 63 },
diff --git a/app/models/clusters/applications/prometheus.rb b/app/models/clusters/applications/prometheus.rb
index 216bbbc1c5a..dd6a4144608 100644
--- a/app/models/clusters/applications/prometheus.rb
+++ b/app/models/clusters/applications/prometheus.rb
@@ -5,7 +5,7 @@ module Clusters
class Prometheus < ApplicationRecord
include PrometheusAdapter
- VERSION = '9.5.2'
+ VERSION = '10.4.1'
self.table_name = 'clusters_applications_prometheus'
@@ -106,7 +106,9 @@ module Clusters
proxy_url = kube_client.proxy_url('service', service_name, service_port, Gitlab::Kubernetes::Helm::NAMESPACE)
# ensures headers containing auth data are appended to original k8s client options
- options = kube_client.rest_client.options.merge(headers: kube_client.headers)
+ options = kube_client.rest_client.options
+ .merge(prometheus_client_default_options)
+ .merge(headers: kube_client.headers)
Gitlab::PrometheusClient.new(proxy_url, options)
rescue Kubeclient::HttpError, Errno::ECONNRESET, Errno::ECONNREFUSED, Errno::ENETUNREACH
# If users have mistakenly set parameters or removed the depended clusters,
diff --git a/app/models/clusters/applications/runner.rb b/app/models/clusters/applications/runner.rb
index e99ed03852a..4983de83800 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.19.3'
+ VERSION = '0.20.1'
self.table_name = 'clusters_applications_runners'
diff --git a/app/models/clusters/cluster.rb b/app/models/clusters/cluster.rb
index 63aebdf1bdb..b94ec3c6dea 100644
--- a/app/models/clusters/cluster.rb
+++ b/app/models/clusters/cluster.rb
@@ -99,6 +99,7 @@ module Clusters
delegate :available?, to: :application_ingress, prefix: true, allow_nil: true
delegate :available?, to: :application_prometheus, prefix: true, allow_nil: true
delegate :available?, to: :application_knative, prefix: true, allow_nil: true
+ delegate :available?, to: :application_elastic_stack, prefix: true, allow_nil: true
delegate :external_ip, to: :application_ingress, prefix: true, allow_nil: true
delegate :external_hostname, to: :application_ingress, prefix: true, allow_nil: true
diff --git a/app/models/clusters/instance.rb b/app/models/clusters/instance.rb
index 8c9d9ab9ab1..94fadace01c 100644
--- a/app/models/clusters/instance.rb
+++ b/app/models/clusters/instance.rb
@@ -7,7 +7,7 @@ module Clusters
end
def feature_available?(feature)
- ::Feature.enabled?(feature, default_enabled: true)
+ ::Feature.enabled?(feature, type: :licensed, default_enabled: true)
end
def flipper_id
diff --git a/app/models/clusters/providers/aws.rb b/app/models/clusters/providers/aws.rb
index 86869361ed8..35e8b751b3d 100644
--- a/app/models/clusters/providers/aws.rb
+++ b/app/models/clusters/providers/aws.rb
@@ -37,7 +37,7 @@ module Clusters
greater_than: 0
}
- validates :key_name, :region, :instance_type, :security_group_id, length: { in: 1..255 }
+ validates :kubernetes_version, :key_name, :region, :instance_type, :security_group_id, length: { in: 1..255 }
validates :subnet_ids, presence: true
def nullify_credentials