Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-24 12:09:25 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-24 12:09:25 +0300
commit6f7881ee9dcec34141a8f34fc814b56b366d2b48 (patch)
tree25f72a06874b32b1049b79a9d7f4f1b7bca43b9b /app/models/clusters
parent8c8bf44fa64f98114f7439f751c92d59a44b3218 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/clusters')
-rw-r--r--app/models/clusters/applications/ingress.rb6
-rw-r--r--app/models/clusters/applications/prometheus.rb12
2 files changed, 13 insertions, 5 deletions
diff --git a/app/models/clusters/applications/ingress.rb b/app/models/clusters/applications/ingress.rb
index 78c2a74da33..baf34e916f8 100644
--- a/app/models/clusters/applications/ingress.rb
+++ b/app/models/clusters/applications/ingress.rb
@@ -50,7 +50,7 @@ module Clusters
end
def allowed_to_uninstall?
- external_ip_or_hostname? && application_jupyter_nil_or_installable?
+ external_ip_or_hostname? && !application_jupyter_installed?
end
def install_command
@@ -161,8 +161,8 @@ module Clusters
YAML.load_file(chart_values_file).deep_merge!(specification)
end
- def application_jupyter_nil_or_installable?
- cluster.application_jupyter.nil? || cluster.application_jupyter&.installable?
+ def application_jupyter_installed?
+ cluster.application_jupyter&.installed?
end
def modsecurity_snippet_content
diff --git a/app/models/clusters/applications/prometheus.rb b/app/models/clusters/applications/prometheus.rb
index 8297f653ea7..3183318690c 100644
--- a/app/models/clusters/applications/prometheus.rb
+++ b/app/models/clusters/applications/prometheus.rb
@@ -35,6 +35,16 @@ module Clusters
.perform_async(application.cluster_id, ::PrometheusService.to_param) # rubocop:disable CodeReuse/ServiceClass
end
end
+
+ after_transition any => :updating do |application|
+ application.update(last_update_started_at: Time.now)
+ end
+ end
+
+ def updated_since?(timestamp)
+ last_update_started_at &&
+ last_update_started_at > timestamp &&
+ !update_errored?
end
def chart
@@ -148,5 +158,3 @@ module Clusters
end
end
end
-
-Clusters::Applications::Prometheus.prepend_if_ee('EE::Clusters::Applications::Prometheus')