Skip to content

Disable clusters API if :certificate_based_clusters is disabled

Tiger Watson requested to merge disable-cert-based-cluster-api into master

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.

#351675 (closed)

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

  1. Create a personal access token
  2. Test successful request:
    $ curl --header "Private-Token: <token>" http://172.16.123.1:3000/api/v4/admin/clusters
    []
  3. Disable the feature flag:
    Feature.disable :certificate_based_clusters
  4. 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.

Edited by Tiger Watson

Merge request reports