thiagowfx's avatar

Β¬ just serendipity πŸ€ (not just serendipity)

ArgoCD: upgrade to v3, remove helm labels

β€’ 136 words β€’ 1 min β€’ updated

⚠️ This post is over one year old. It may no longer be up to date or relevant. Opinions may have changed.

I am leading the effort to upgrade ArgoCD to its newest major version (v3) across our fleet.

One of its breaking changes is the removal of helm labels from argo applications, like such:

yaml
metadata:
# [...]
  labels:
    app.kubernetes.io/managed-by: Helm

Applying a normal sync does not get rid of the label.

I found out that doing an one-off server-side apply sync addresses the label removal, and it is safe to do (incurs no downtime):

However, there are some cases where you want to use kubectl apply --server-side over kubectl apply:

[…]

Patching of existing resources on the cluster that are not fully managed by Argo CD.

There’s no need to make the server-side apply a permanent config, i.e.:

yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
  syncPolicy:
    syncOptions:
    - ServerSideApply=true

…though there’s no harm either in doing so.