gitlab-org--gitlab-foss/app/workers/cluster_configure_worker.rb
Tiger fa5a6ae172 Stop configuring group clusters on creation
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.
2019-05-16 20:18:42 -05:00

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