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
include ::Clusters::Concerns::ApplicationData
include AfterCommitQueue
alias_method :original_set_initial_status, :set_initial_status
def set_initial_status
return unless not_installable?
return unless verify_cluster?
return unless cluster&.platform_kubernetes_rbac?
self.status = status_states[:installable]
original_set_initial_status
end
state_machine :status do
......@@ -131,10 +131,6 @@ module Clusters
[Gitlab::Kubernetes::KubectlCmd.delete("--ignore-not-found", "-f", METRICS_CONFIG)]
end
def verify_cluster?
cluster&.application_helm_available? && cluster&.platform_kubernetes_rbac?
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