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

Support Replacement of Resources #772

Open
blakeromano opened this issue Sep 13, 2024 · 3 comments
Open

Support Replacement of Resources #772

blakeromano opened this issue Sep 13, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@blakeromano
Copy link

What problem are you facing?

Crossplane currently doesn't support in-place replacement of resources. Currently you'd need to do things like https://github.com/haarchri/configuration-aws-tgw-routes/blob/main/apis/composition.yaml#L28 in your composition to support automatic replacement.

How could Crossplane help solve your problem?

Crossplane could open up an option to have a Replace or Replacement managementPolicy which would allow Crossplane Runtime to essentially run a replacement on that resource.

In the Upjet providers this probably means checking if Replace managementPolicy is set then allowing for TF to do a replacement update. This will probably need provider specific implementations for other providers that are not TF based.

@blakeromano blakeromano added the enhancement New feature or request label Sep 13, 2024
Copy link

Crossplane does not currently have enough maintainers to address every issue and pull request. This issue has been automatically marked as stale because it has had no activity in the last 90 days. It will be closed in 14 days if no further activity occurs. Leaving a comment starting with /fresh will mark this issue as not stale.

@github-actions github-actions bot added the stale label Dec 13, 2024
@blakeromano
Copy link
Author

/fresh

@github-actions github-actions bot removed the stale label Dec 13, 2024
@cirano-eusebi
Copy link

I had to implement the same trick to force recreation of an istio DestinationRule being created with the Kubernetes-Provider due to patch command failing with an error

Istio related error for the curious `Validation failed in API: DestinationRule.networking.istio.io "test" is invalid: [: Invalid value: "": "spec.trafficPolicy.loadBalancer" must validate one and only one schema (oneOf). Found none valid, : Invalid value: "": "spec.trafficPolicy.loadBalancer.consistentHash" must validate one and only one schema (oneOf). Found 2 valid alternatives]` It's still not clear to me why the `consistentHash` & `useSourceIp` were being set but the recommendation was to use `apply` instead of `patch`.

Unfortunately, Kubernetes-provider (which is implemented using this lib) doesn't support customizing how it gets applied, the only way out we have is this recreate trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants