Ask questionsOption for using `kubectl replace --force` when fail to apply

When we want change immutable fields (e.g. label selector in Deployment), currently we need to take two steps:

  1. Enable garbage collection for a resource and delete the resource from a repository
  2. Add the resource again to the repository with a new definition

It would be great if kustomize-controller does the above operation in one reconciliation by using kubectl replace --force command.


Answer questions ordovicia

Ah, you are quite right. Thank you for your explanation.

So, what do you think is the best practice for changing immutable fields when using GitOps Toolkit? Do we need to delete old resources in a reconciliation and add the resources again with new definitions (manifests) in another reconciliation?


Related questions

No questions were found.
Github User Rank List