summaryrefslogtreecommitdiff
path: root/app/models/clusters
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-14 00:08:14 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-14 00:08:14 +0000
commit427c549b6396885fb60a687326b6cd62878e4ca3 (patch)
tree145713e2f6fdaf7499b0cb44010503e16b6248b9 /app/models/clusters
parent74a89b1221eaf780374bd1d4c5b2ee4a0f488908 (diff)
downloadgitlab-ce-427c549b6396885fb60a687326b6cd62878e4ca3.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/clusters')
-rw-r--r--app/models/clusters/applications/elastic_stack.rb33
-rw-r--r--app/models/clusters/applications/ingress.rb6
2 files changed, 4 insertions, 35 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 d41fc72ae68..63f216c7af5 100644
--- a/app/models/clusters/applications/ingress.rb
+++ b/app/models/clusters/applications/ingress.rb
@@ -42,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
@@ -155,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