QA: Use basic auth to create cluster role binding
What does this MR do?
Without the right permissions, when we run the QA specs for auto devops we will get the following when attempting to create a cluster role binding :
Error from server (Forbidden): error when creating "STDIN": clusterrolebindings.rbac.authorization.k8s.io is forbidden: User "tkuah@gitlab.com" cannot create clusterrolebindings.rbac.authorization.k8s.io at the cluster scope: Required "container.clusterRoleBindings.create" permission.
One way to fix this would be to obtain the right permissions for each user.
This MR instead only requires that the user has the permission to create a cluster and works by using the cluster basic auth to create the cluster role binding. This is very much like how we do it in https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/services/clusters/gcp/finalize_creation_service.rb#L27
What are the relevant issue numbers?
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides
Edited by 🤖 GitLab Bot 🤖