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

track and garbage collect orphaned resources #187

Open
a-hilaly opened this issue Jan 9, 2025 · 0 comments
Open

track and garbage collect orphaned resources #187

a-hilaly opened this issue Jan 9, 2025 · 0 comments

Comments

@a-hilaly
Copy link
Member

a-hilaly commented Jan 9, 2025

Feature Description

Currently kro does not track resources that become orphaned when users modify a ResourceGroup's templates or change includeWhen conditions. we need to add a managedResources (maybe there is a better name) status field to instances to track owned resources, and implement garbage collection after successful reconciliation. This will ensure that resources are properly cleaned up when they are removed from templates or when includeWhen conditions change from true to
false.

Example:

apiVersion: kro.run/v1alpha1
kind: Application
metadata:
  name: my-application
spec:
  name: my-app
  ingress:
    enabled: false  # When this changes from true to false, the ingress should be GC'd
status:
  managedResources:  # New status field tracking resources
    - kind: Deployment
      name: my-app
      namespace: default
    - kind: Service
      name: my-app-service
      namespace: default
    - kind: Ingress
      name: my-ingress
      namespace: default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant