profile
viewpoint

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.

fluxcd/kustomize-controller

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?

useful!

Related questions

No questions were found.
source:https://uonfu.com/
Github User Rank List