EE Port: Improves restriction of multiple Kubernetes clusters via API
What does this MR do?
EE Port of https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24251. Adds EE specific spec scenarios to ensure multiple_clusters
feature is being respected on EE.
> curl --header 'Private-Token: '$MAINTAINER_PAT'' http://localhost:3001/api/v4/projects/26/clusters/user \
-H "Accept: application/json" \
-H "Content-Type:application/json" \
-X POST --data '{"name":"cluster-10", "environment_scope":"cluster-10-environment/*", "platform_kubernetes_attributes":>{"api_url":"https://cluster-10-api.com","token":"12345","namespace":"cluster-10-namespace"}}'
> {"id":30,"name":"cluster-10","created_at":"2019-01-09T00:13:35.208Z","provider_type":"user","platform_type":"kubernetes","environment_scope":"cluster-10-environment/*","cluster_type":"project_type",...}
❯ curl --header 'Private-Token: '$MAINTAINER_PAT'' http://localhost:3001/api/v4/projects/26/clusters/user \
-H "Accept: application/json" \
-H "Content-Type:application/json" \
-X POST --data '{"name":"cluster-11", "environment_scope":"cluster-11-environment/*", "platform_kubernetes_attributes":{"api_url":"https://cluster-11-api.com","token":"12345","namespace":"cluster-11-namespace"}}'
> {"id":31,"name":"cluster-11","created_at":"2019-01-09T00:13:56.505Z","provider_type":"user","platform_type":"kubernetes","environment_scope":"cluster-11-environment/*","cluster_type":"project_type",...}
What are the relevant issue numbers?
https://gitlab.com/gitlab-org/gitlab-ce/issues/56110
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary - [-] Documentation created/updated
-
Tests added for this feature/bug - [-] Tested in all supported browsers
-
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides - [-] Conforms to the database guides
- [-] Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process.
-
EE specific content should be in the top level /ee
folder - [-] For a paid feature, have we considered GitLab.com plans, how it works for groups, and is there a design for promoting it to users who aren't on the correct plan?
- [-] Security reports checked/validated by reviewer
Edited by 🤖 GitLab Bot 🤖