Replies: 4 comments 1 reply
-
|
+1 BTW, we can include this in the Gateway Controller's Config Dump with status as inactive. This config dump is for troubleshooting purposes. If we want to support this even in the standalone gateway, without losing API keys, we can add a new field in the spec section like |
Beta Was this translation helpful? Give feedback.
-
|
+1 for keeping the undeployed status instead of deletion. Regarding REST APIs,
|
Beta Was this translation helpful? Give feedback.
-
|
If we are providing a way to undeploy APIs using the GW Controller REST API, we should also make it possible to define it in the API YAML spec. Users may use the GitOps approach or the K8s Operator approach, and this will enable those users to have the undeploy option as well. Proposed Field:
|
| Platform | Field | Values | Use Case |
|---|---|---|---|
| Kubernetes CronJob | spec.suspend |
true/false |
Temporarily stop job scheduling |
| Argo Rollouts | spec.paused |
true/false |
Pause in-flight rollout |
| ArgoCD | syncPolicy.automated.enabled |
true/false |
Enable/disable automated sync |
Why enabled over alternatives?
| Option | Issue |
|---|---|
suspend: true |
Semantically implies "paused mid-operation"; CronJob uses this for stopping future executions |
paused: true |
Implies an in-flight operation is paused (Argo Rollouts pattern) |
state: deployed/undeployed |
More verbose; enum adds complexity when boolean suffices |
enabled: true/false |
Positive-sense boolean, universally understood, matches ArgoCD pattern |
Following Kubernetes API design best practices, enabled is a positive-sense boolean that clearly communicates intent without ambiguity.
Beta Was this translation helpful? Give feedback.
-
|
Sorry, shouldn't this be part of a seperate "status" field which is not part of the spec? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem Statement
When Platform-API sends an APIUndeployed event (indicating a deployment is being transitioned out of active state), Gateway-Controller needs to handle it appropriately. This is distinct from the GW Controller REST API [DELETE /apis/{id}]endpoint, which permanently removes APIs, its API keys etc. We need to define what "undeployed" means in the gateway's state model and how it should behave.
Proposed Solution
When APIUndeployed Event Arrives:
Set status to "undeployed" (NOT delete)
A new status is introduced to ConfigStatus as
undeployed. Will be keeping the DeployedVersion in StoredConfig as it is. It tracks the last successful deployment.Keep config in memory/DB for potential redeploy
Clear xDS routes (snapshot excludes undeployed)
Preserve API Keys and Policies
REST API Considerations
Need to handle the visibility of undeployed APIs in Controller REST API with this solution.
Beta Was this translation helpful? Give feedback.
All reactions