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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting DeleteBeforeReplace without the need to implement resource.CustomDiff #113

Open
danischm opened this issue Aug 29, 2023 · 3 comments
Labels
kind/enhancement Improvements or new features

Comments

@danischm
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 would be great if we could specify the DeleteBeforeReplace resource behavior without having to implement CustomDiff and therefore having to re-implement the default diff logic.

Affected area/feature

// DeleteBeforeReplace: ???,

@danischm danischm added kind/enhancement Improvements or new features needs-triage Needs attention from the triage team labels Aug 29, 2023
@iwahbe iwahbe removed the needs-triage Needs attention from the triage team label Aug 30, 2023
@iwahbe
Copy link
Member

iwahbe commented Aug 30, 2023

Hi @danischm. Thanks for opening this issue. I agree that there should be a lighter way to do this then to reimplement Diff.

@danischm
Copy link
Author

danischm commented Sep 1, 2023

Hi @iwahbe ! What would be the right approach for this? I am thinking about an annotation at the resource level, something like:

func (c *CustomResource) Annotate(a infer.Annotator) {
	a.DeleteBeforeReplace(&c, true)
}

@iwahbe
Copy link
Member

iwahbe commented Sep 1, 2023

@danischm I think that makes a lot of sense.

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