Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Konnect entities: All entities get deleted when referenced ControlPlane gets deleted #788

Open
randmonkey opened this issue Oct 24, 2024 · 3 comments
Labels
area/konnect bug Something isn't working
Milestone

Comments

@randmonkey
Copy link
Contributor

Current Behavior

When a KonnectGatewayControlPlane is deleted, the control plane is deleted on the Konnect side and all attached entities (services, routes, consumers, ...) gets deleted as well. Then, all corresponding k8s resources (KongService,KongRoute,KongConsumer,...) gets deleted silently.

Expected Behavior

Similar to #786, If cascade deletion is expected, we should add logs to tell that the resource are deleted.

Steps To Reproduce

Operator Version

kubectl version

@randmonkey randmonkey added bug Something isn't working area/konnect labels Oct 24, 2024
@randmonkey randmonkey added this to the KGO v1.4.x milestone Oct 24, 2024
@pmalek pmalek changed the title Konnect entities: All entities gets deleted when attaching control plane deleted Konnect entities: All entities get deleted when referenced ControlPlane gets deleted Oct 28, 2024
@pmalek
Copy link
Member

pmalek commented Oct 28, 2024

We have to consider if we'd like to support a use case where users having CP and entities configured within it:

  • delete a CP
  • create a CP (with the same name and type)

Currently, after the CP deletion, users will get all their entities from within that CP deleted. Recreating the CP will not have the same config as all its configuration entities are gone at this point.

Changing the behavior to not delete these entities would:

  • make the configuration entities have their status updated
  • allow recreating the CP which would get all the configuration that previous CP had
  • make Konnect entities work more seamlessly with git-ops tools: there would be no drift between what's defined in source control and what's in cluster

cc: @mheap

@mheap
Copy link
Member

mheap commented Oct 31, 2024

This is a tough one. Cascade delete is what a lot of people would expect, but I'm not sure that's true in a cluster.

I think that I'd expect non-CP resources to remain in the cluster with an updated status, and if they recreate the CP they will start to reconcile again.

@pmalek pmalek modified the milestones: KGO v1.4.x, KGO v1.5.x Oct 31, 2024
@pmalek
Copy link
Member

pmalek commented Oct 31, 2024

As agreed on slack https://kongstrong.slack.com/archives/C079GK3KB9R/p1730102565181899 we're ok with shipping 1.4 without this change.

Adding to 1.5.x milestone to fix after 1.4 gets released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/konnect bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants