Disable clusters API if :certificate_based_clusters is disabled
What does this MR do and why?
Disables the management API endpoints for legacy, certificate-based clusters if the :certificate_based_clusters
feature flag is disabled.
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
- Create a personal access token
- Test successful request:
$ curl --header "Private-Token: <token>" http://172.16.123.1:3000/api/v4/admin/clusters []
- Disable the feature flag:
Feature.disable :certificate_based_clusters
- Test unsuccessful request:
$ curl --header "Private-Token: <token>" http://172.16.123.1:3000/api/v4/admin/clusters {"message":"404 Not Found"}
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Tiger Watson