Resolve "Add feature flag to Advanced Traffic control with Canary Ingress"
requested to merge 351665-add-feature-flag-to-advanced-traffic-control-with-canary-ingress into master
What does this MR do and why?
As part of the removal of certificate-based feature, we're hiding all feature behind this FF, so that on 15.0 it's easier to remove them without actually having to remove the code.
For GraphQL it's not the simple to actually remove a mutation endpoint and bring it back with a FF as the schema is not regenerated after the FF changed. So the approach is to keep the endpoint but return an error with a comprehensible message.
Screenshots or screen recordings
With certificate_based_clusters FF enabled
With certificate_based_clusters FF disabled
How to set up and validate locally
- On rails console:
Feature.enable(:certificate_based_clusters)
- On graphql-explorer run the mutation as in the image above
- On rails console:
Feature.disable(:certificate_based_clusters)
- On graphql-explorer run the mutation as in the image above
Mutation sample for easy copy/paste:
mutation {
environmentsCanaryIngressUpdate(input:{
id: "gid://gitlab/Environment/29", # Your Environment ID. You can get the ID from the URL of the environment page.
weight: 45 # The new traffic weight. e.g. If you set `45`, 45% of traffic goes to a canary deployment and 55% of traffic goes to a stable deployment.
}) {
errors
}
}
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.
Related to #351665 (closed)
Edited by João Alexandre Cunha