Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2018-09-07 13:01:37 +0300
committerThong Kuah <tkuah@gitlab.com>2018-09-14 07:26:51 +0300
commit9c5050b12226781d49d2ce25d47477eab6a4354b (patch)
tree2a7eb79693e19b3bc6d85ee1514fa795a4d19ffe /app
parent577c79bb58ae80f4d7aef55e76bfeff67a1cfc45 (diff)
Drive creation of a rbac platform_kubernetes off provider#legacy_abac so that there is one single source of truth.
Diffstat (limited to 'app')
-rw-r--r--app/services/clusters/gcp/finalize_creation_service.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/services/clusters/gcp/finalize_creation_service.rb b/app/services/clusters/gcp/finalize_creation_service.rb
index 40103d8e213..8170e732d48 100644
--- a/app/services/clusters/gcp/finalize_creation_service.rb
+++ b/app/services/clusters/gcp/finalize_creation_service.rb
@@ -25,7 +25,7 @@ module Clusters
private
def create_gitlab_service_account!
- if rbac_clusters_feature_enabled?
+ if create_rbac_cluster?
Clusters::Gcp::Kubernetes::CreateServiceAccountService.new(kube_client).execute
end
end
@@ -47,17 +47,17 @@ module Clusters
end
def request_kubernetes_token
- service_account_name = rbac_clusters_feature_enabled? ? Clusters::Gcp::Kubernetes::SERVICE_ACCOUNT_NAME : 'default'
+ service_account_name = create_rbac_cluster? ? Clusters::Gcp::Kubernetes::SERVICE_ACCOUNT_NAME : 'default'
Clusters::Gcp::Kubernetes::FetchKubernetesTokenService.new(kube_client, service_account_name).execute
end
def authorization_type
- rbac_clusters_feature_enabled? ? 'rbac' : 'abac'
+ create_rbac_cluster? ? 'rbac' : 'abac'
end
- def rbac_clusters_feature_enabled?
- Feature.enabled?(:rbac_clusters)
+ def create_rbac_cluster?
+ !provider.legacy_abac?
end
def kube_client