How to rename the argocd application name? Eg. I put the application name in the test I want to rename the application like test into dev? #8305
Replies: 5 comments 5 replies
-
|
Is it possible to without the deletion process to rename the application |
Beta Was this translation helpful? Give feedback.
-
|
Hi @tamilsaran, Argo CD Application is a Kubernetes custom resource, and AFAIK the name metadata in Kubernetes is immutable. I think it's not possible to rename an existing resource. We could export the old resource, rename and create a new one, and delete the old resource. |
Beta Was this translation helpful? Give feedback.
-
|
Hello, Maybe a little late to the discussion, but as I was trying to do the same thing and google brought me here. I'm adding what I've done in this thread in case it may be useful. What I did first is disable pruning, self-heal and auto-sync on the old app. I then added the app with new name. Argo showed me a "shared resource warning" on the old app for all the application resources (my app is an application of applications). I then deleted the old application without cascading and ended in the state I was looking for. |
Beta Was this translation helpful? Give feedback.
-
|
Note to the community - technically application "name" does not have to be the "ID", the display name on the UI can be rendered from separate field - so it CAN be supported (although not sure if it will be intuitive because of the metadata field name). As you mentioned the IDs (in this case the metadata "name" field still) are immutable and cannot be changed, however if there is a need to dynamically change the names a tagging-like mechanism should be used (technically the CRD name in that case can even be an UUID). As I mentioned in my other comment and as @antoinemartin did it is still possible to "rename" the app by destroying it with non-cascading option and just re-creating with a new name. |
Beta Was this translation helpful? Give feedback.
-
|
If anyone is still following this discussion - I have an open PR that implements a UI display name override via an annotation: #26695 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
How to rename the argocd application name? Eg. I put the application name in the test I want to rename the application like test into dev?
Beta Was this translation helpful? Give feedback.
All reactions