Commit graph

13 commits

Author SHA1 Message Date
Thong Kuah
3c5c6c2c2e Address BE review - re-arrange some specs 2018-09-14 16:26:51 +12:00
Thong Kuah
a02e35308b Always create gitlab service account and service account token regardless of ABAC/RBAC
This also solves the async nature of the automatic creation of default
service tokens for service accounts. It also makes explicit which
service account token we always use.

create cluster role binding only if the provider has legacy_abac
disabled.
2018-09-14 16:26:51 +12:00
Thong Kuah
9c5050b122 Drive creation of a rbac platform_kubernetes off provider#legacy_abac so that there is one single source of truth. 2018-09-14 16:26:51 +12:00
Thong Kuah
577c79bb58 ABAC: fetch default service account token; RBAC: fetch gitlab service acount token
Keeps existing behaviour for ABAC cluster
2018-09-14 16:26:51 +12:00
Thong Kuah
ab6d74da9a Only create new service account with cluster-admin clusterrolebinding for when we have the rbac cluster FF enabled.
This syncs up with `authorization_type`.
2018-09-14 16:26:51 +12:00
Thong Kuah
bf0179b7f1 Set RBAC support behind a feature flag.
This is the same as with adding an existing cluster
2018-09-14 16:26:50 +12:00
Thong Kuah
3eec327d50 Refactor to DRY out building of kube_client into originator service 2018-09-14 16:26:50 +12:00
Thong Kuah
7ebc18d1b3 When provisioning a new cluster, create gitlab service account so that GitLab can perform operations in a RBAC-enabled cluster.
Correspondingly, use the token of the gitlab service account, vs the
default service account token which will have no privs.
2018-09-14 16:26:50 +12:00
Thong Kuah
fe450ebf51 Move FetchKubernetesTokenService to under the Clusters::Gcp::Kubernetes namespace
This is in preparation to share some common code with another service
which will also need a kubeclient utilizing master username and password
2018-09-14 16:26:50 +12:00
Shinya Maeda
a99ad59e65 Remove 10.3 comments (Tracked by a tech debts issue). Refactor spec factory name. Use ArgumentError 2017-11-06 23:06:10 +09:00
Shinya Maeda
3602c0b987 Fix some tests 2017-11-03 03:37:32 +09:00
Shinya Maeda
6571efb6c3 Fix spec. Fix usage ping. Fix warnings by adding new models and attributes. 2017-11-01 16:12:44 +09:00
Shinya Maeda
d6744d9838 specs for services. Improved details. 2017-10-30 21:55:18 +09:00