diff options
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/clusters/create_service.rb | 5 | ||||
-rw-r--r-- | app/services/clusters/gcp/provision_service.rb | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/app/services/clusters/create_service.rb b/app/services/clusters/create_service.rb index e3e0cfa462c..eb171daa694 100644 --- a/app/services/clusters/create_service.rb +++ b/app/services/clusters/create_service.rb @@ -25,11 +25,16 @@ module Clusters params[:provider_gcp_attributes].try do |provider| provider[:access_token] = access_token + provider[:legacy_abac] = legacy_abac_value end @cluster_params = params.merge(user: current_user, projects: [project]) end + def legacy_abac_value + !Feature.enabled?(:rbac_clusters) + end + def can_create_cluster? project.clusters.empty? end diff --git a/app/services/clusters/gcp/provision_service.rb b/app/services/clusters/gcp/provision_service.rb index 0d8b39a552b..80040511ec2 100644 --- a/app/services/clusters/gcp/provision_service.rb +++ b/app/services/clusters/gcp/provision_service.rb @@ -28,7 +28,7 @@ module Clusters provider.cluster.name, provider.num_nodes, machine_type: provider.machine_type, - legacy_abac: true + legacy_abac: provider.legacy_abac ) unless operation.status == 'PENDING' || operation.status == 'RUNNING' |