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

Program CRD should be prevented from deletion when referenced #791

Open
project0 opened this issue Jan 16, 2025 · 2 comments
Open

Program CRD should be prevented from deletion when referenced #791

project0 opened this issue Jan 16, 2025 · 2 comments
Labels
kind/enhancement Improvements or new features

Comments

@project0
Copy link

Hello!

  • Vote on this issue by adding a 👍 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

It is possible to delete a Program resource when it is still referenced by a Stack, this is problematic as the Stack then becomes stale and blocks further activities (like with argocd ApplicationSet). I think ideally the operator should support finalizers so it is prevented from out of order deletions.

Affected area/feature

@project0 project0 added kind/enhancement Improvements or new features needs-triage Needs attention from the triage team labels Jan 16, 2025
@EronWright EronWright removed the needs-triage Needs attention from the triage team label Jan 23, 2025
@EronWright
Copy link
Contributor

EronWright commented Jan 23, 2025

It is true that the Stack depends on the Program object as well as a ServiceAccount and possibly a ClusterRoleBinding. Note that a given program (or service account for that matter) might be used by numerous Stacks. It might make sense to apply a finalizer, if the finalizer name was based on the stack name.

As a workaround for the specific situation where the Program object is deleted prematurely, one should be able to re-create the object to unblock the Stack object.

In an Argo CD integration scenario, I would recommend using sync-waves to ensure the correct ordering of ServiceAccount, ClusterRoleBinding, Program, then Stack. Note that sync waves are also respected during deletion.

@project0
Copy link
Author

yeah, for this case i already added sync waves, but i would prefer the operator prevents such breaking situations at its own (by an finalizer as example)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features
Projects
None yet
Development

No branches or pull requests

2 participants