fa5a6ae172
Immediate configuration is not ideal for group and instance level clusters as projects that may never be deployed would still have Kubernetes namespaces and service accounts created for them. As of https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/25586 we now create only the resources that are required for the project being deployed, at the time of deployment.
14 lines
349 B
Ruby
14 lines
349 B
Ruby
# frozen_string_literal: true
|
|
|
|
class ClusterConfigureWorker
|
|
include ApplicationWorker
|
|
include ClusterQueue
|
|
|
|
def perform(cluster_id)
|
|
Clusters::Cluster.managed.find_by_id(cluster_id).try do |cluster|
|
|
if cluster.project_type?
|
|
Clusters::RefreshService.create_or_update_namespaces_for_cluster(cluster)
|
|
end
|
|
end
|
|
end
|
|
end
|