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>2023-01-30 15:07:29 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-30 15:07:29 +0300
commit7cf8c080eda823e7e2577eeed1f96e168c37ee8f (patch)
tree25777ab1b8883dd4cff80005a2edc5e385e16714 /app/models/clusters
parent4381702a8509383c7158a4d89a0ed187532604f2 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/clusters')
-rw-r--r--app/models/clusters/cluster.rb42
1 files changed, 33 insertions, 9 deletions
diff --git a/app/models/clusters/cluster.rb b/app/models/clusters/cluster.rb
index 84e9b6a8df7..55dbaf9c6b7 100644
--- a/app/models/clusters/cluster.rb
+++ b/app/models/clusters/cluster.rb
@@ -89,15 +89,7 @@ module Clusters
delegate :status, to: :provider, allow_nil: true
delegate :status_reason, to: :provider, allow_nil: true
- delegate :on_creation?, to: :provider, allow_nil: true
- delegate :knative_pre_installed?, to: :provider, allow_nil: true
-
- delegate :active?, to: :platform_kubernetes, prefix: true, allow_nil: true
- delegate :rbac?, to: :platform_kubernetes, prefix: true, allow_nil: true
- delegate :available?, to: :application_helm, prefix: true, allow_nil: true
- delegate :available?, to: :application_ingress, prefix: true, allow_nil: true
- delegate :available?, to: :application_knative, prefix: true, allow_nil: true
- delegate :available?, to: :integration_prometheus, 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
@@ -264,6 +256,38 @@ module Clusters
integration_prometheus || build_integration_prometheus
end
+ def on_creation?
+ !!provider&.on_creation?
+ end
+
+ def knative_pre_installed?
+ !!provider&.knative_pre_installed?
+ end
+
+ def platform_kubernetes_active?
+ !!platform_kubernetes&.active?
+ end
+
+ def platform_kubernetes_rbac?
+ !!platform_kubernetes&.rbac?
+ end
+
+ def application_helm_available?
+ !!application_helm&.available?
+ end
+
+ def application_ingress_available?
+ !!application_ingress&.available?
+ end
+
+ def application_knative_available?
+ !!application_knative&.available?
+ end
+
+ def integration_prometheus_available?
+ !!integration_prometheus&.available?
+ end
+
def provider
if gcp?
provider_gcp