diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2019-04-17 21:41:15 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2019-04-17 21:41:15 +0300 |
commit | a6a1afe070ffe4fa66b5ace9d35ca8c6ee481986 (patch) | |
tree | c2a72f4fb532f6a35605f4e59f7041a5714e80c5 /app/workers | |
parent | 52375ed701370939f4fd50e68131954d9285794f (diff) | |
parent | e33ecfdec30a8efee191f8c2dd85ca54011128ce (diff) |
Merge branch '60500-disable-jit-kubernetes-resource-creation-for-project-level-clusters' into 'master'
Disable JIT Kubernetes resource creation for project level clusters
Closes #60500
See merge request gitlab-org/gitlab-ce!27352
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/cluster_configure_worker.rb | 6 | ||||
-rw-r--r-- | app/workers/cluster_project_configure_worker.rb | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/app/workers/cluster_configure_worker.rb b/app/workers/cluster_configure_worker.rb index b984dee5b21..22681157b62 100644 --- a/app/workers/cluster_configure_worker.rb +++ b/app/workers/cluster_configure_worker.rb @@ -5,10 +5,10 @@ class ClusterConfigureWorker include ClusterQueue def perform(cluster_id) - return if Feature.enabled?(:ci_preparing_state, default_enabled: true) - Clusters::Cluster.find_by_id(cluster_id).try do |cluster| - Clusters::RefreshService.create_or_update_namespaces_for_cluster(cluster) + if cluster.project_type? || Feature.disabled?(:ci_preparing_state, default_enabled: true) + Clusters::RefreshService.create_or_update_namespaces_for_cluster(cluster) + end end end end diff --git a/app/workers/cluster_project_configure_worker.rb b/app/workers/cluster_project_configure_worker.rb index d7bea69a01c..497e57c0d0b 100644 --- a/app/workers/cluster_project_configure_worker.rb +++ b/app/workers/cluster_project_configure_worker.rb @@ -5,8 +5,6 @@ class ClusterProjectConfigureWorker include ClusterQueue def perform(project_id) - return if Feature.enabled?(:ci_preparing_state, default_enabled: true) - project = Project.find(project_id) ::Clusters::RefreshService.create_or_update_namespaces_for_project(project) |