summaryrefslogtreecommitdiff
path: root/app/models/clusters
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/clusters')
-rw-r--r--app/models/clusters/applications/elastic_stack.rb33
-rw-r--r--app/models/clusters/applications/ingress.rb9
-rw-r--r--app/models/clusters/applications/jupyter.rb2
-rw-r--r--app/models/clusters/applications/prometheus.rb4
-rw-r--r--app/models/clusters/applications/runner.rb2
-rw-r--r--app/models/clusters/concerns/application_core.rb2
6 files changed, 11 insertions, 41 deletions
diff --git a/app/models/clusters/applications/elastic_stack.rb b/app/models/clusters/applications/elastic_stack.rb
index 9854ad2ea3e..e86a4597ed8 100644
--- a/app/models/clusters/applications/elastic_stack.rb
+++ b/app/models/clusters/applications/elastic_stack.rb
@@ -15,24 +15,15 @@ module Clusters
include ::Clusters::Concerns::ApplicationData
include ::Gitlab::Utils::StrongMemoize
- default_value_for :version, VERSION
-
- def set_initial_status
- return unless not_installable?
- return unless cluster&.application_ingress_available?
+ include IgnorableColumns
+ ignore_column :kibana_hostname, remove_with: '12.8', remove_after: '2020-01-22'
- ingress = cluster.application_ingress
- self.status = status_states[:installable] if ingress.external_ip_or_hostname?
- end
+ default_value_for :version, VERSION
def chart
'stable/elastic-stack'
end
- def values
- content_values.to_yaml
- end
-
def install_command
Gitlab::Kubernetes::Helm::InstallCommand.new(
name: 'elastic-stack',
@@ -78,24 +69,6 @@ module Clusters
private
- def specification
- {
- "kibana" => {
- "ingress" => {
- "hosts" => [kibana_hostname],
- "tls" => [{
- "hosts" => [kibana_hostname],
- "secretName" => "kibana-cert"
- }]
- }
- }
- }
- end
-
- def content_values
- YAML.load_file(chart_values_file).deep_merge!(specification)
- end
-
def post_delete_script
[
Gitlab::Kubernetes::KubectlCmd.delete("pvc", "--selector", "release=elastic-stack")
diff --git a/app/models/clusters/applications/ingress.rb b/app/models/clusters/applications/ingress.rb
index d140649af3c..63f216c7af5 100644
--- a/app/models/clusters/applications/ingress.rb
+++ b/app/models/clusters/applications/ingress.rb
@@ -14,6 +14,7 @@ module Clusters
include AfterCommitQueue
default_value_for :ingress_type, :nginx
+ default_value_for :modsecurity_enabled, false
default_value_for :version, VERSION
enum ingress_type: {
@@ -41,7 +42,7 @@ module Clusters
end
def allowed_to_uninstall?
- external_ip_or_hostname? && application_jupyter_nil_or_installable? && application_elastic_stack_nil_or_installable?
+ external_ip_or_hostname? && application_jupyter_nil_or_installable?
end
def install_command
@@ -73,7 +74,7 @@ module Clusters
private
def specification
- return {} unless Feature.enabled?(:ingress_modsecurity)
+ return {} unless modsecurity_enabled
{
"controller" => {
@@ -154,10 +155,6 @@ module Clusters
def application_jupyter_nil_or_installable?
cluster.application_jupyter.nil? || cluster.application_jupyter&.installable?
end
-
- def application_elastic_stack_nil_or_installable?
- cluster.application_elastic_stack.nil? || cluster.application_elastic_stack&.installable?
- end
end
end
end
diff --git a/app/models/clusters/applications/jupyter.rb b/app/models/clusters/applications/jupyter.rb
index ca93bc15be0..42fa4a6f179 100644
--- a/app/models/clusters/applications/jupyter.rb
+++ b/app/models/clusters/applications/jupyter.rb
@@ -5,7 +5,7 @@ require 'securerandom'
module Clusters
module Applications
class Jupyter < ApplicationRecord
- VERSION = '0.9-174bbd5'
+ VERSION = '0.9.0-beta.2'
self.table_name = 'clusters_applications_jupyter'
diff --git a/app/models/clusters/applications/prometheus.rb b/app/models/clusters/applications/prometheus.rb
index 4ac33d4e3be..d24a298b0a6 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 = '6.7.3'
+ VERSION = '9.5.2'
self.table_name = 'clusters_applications_prometheus'
@@ -90,7 +90,7 @@ module Clusters
# ensures headers containing auth data are appended to original k8s client options
options = kube_client.rest_client.options.merge(headers: kube_client.headers)
Gitlab::PrometheusClient.new(proxy_url, options)
- rescue Kubeclient::HttpError, Errno::ECONNRESET, Errno::ECONNREFUSED
+ rescue Kubeclient::HttpError, Errno::ECONNRESET, Errno::ECONNREFUSED, Errno::ENETUNREACH
# If users have mistakenly set parameters or removed the depended clusters,
# `proxy_url` could raise an exception because gitlab can not communicate with the cluster.
# Since `PrometheusAdapter#can_query?` is eargely loaded on environement pages in gitlab,
diff --git a/app/models/clusters/applications/runner.rb b/app/models/clusters/applications/runner.rb
index fd05fd6bab9..a908ca28188 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.11.0'
+ VERSION = '0.12.0'
self.table_name = 'clusters_applications_runners'
diff --git a/app/models/clusters/concerns/application_core.rb b/app/models/clusters/concerns/application_core.rb
index f6431f5bac3..b94f2b15846 100644
--- a/app/models/clusters/concerns/application_core.rb
+++ b/app/models/clusters/concerns/application_core.rb
@@ -15,7 +15,7 @@ module Clusters
def set_initial_status
return unless not_installable?
- self.status = status_states[:installable] if cluster&.application_helm_available?
+ self.status = status_states[:installable] if cluster&.application_helm_available? || Feature.enabled?(:managed_apps_local_tiller)
end
def can_uninstall?