Commit bbf014e6 authored by James Lopez's avatar James Lopez

Merge branch 'refactor_knative_set_initial_status' into 'master'

Refactor to not copy from original method

See merge request gitlab-org/gitlab!20901
parents daff9851 df1bccce
...@@ -17,11 +17,11 @@ module Clusters ...@@ -17,11 +17,11 @@ module Clusters
include ::Clusters::Concerns::ApplicationData include ::Clusters::Concerns::ApplicationData
include AfterCommitQueue include AfterCommitQueue
alias_method :original_set_initial_status, :set_initial_status
def set_initial_status def set_initial_status
return unless not_installable? return unless cluster&.platform_kubernetes_rbac?
return unless verify_cluster?
self.status = status_states[:installable] original_set_initial_status
end end
state_machine :status do state_machine :status do
...@@ -131,10 +131,6 @@ module Clusters ...@@ -131,10 +131,6 @@ module Clusters
[Gitlab::Kubernetes::KubectlCmd.delete("--ignore-not-found", "-f", METRICS_CONFIG)] [Gitlab::Kubernetes::KubectlCmd.delete("--ignore-not-found", "-f", METRICS_CONFIG)]
end end
def verify_cluster?
cluster&.application_helm_available? && cluster&.platform_kubernetes_rbac?
end
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment