argo-cd icon indicating copy to clipboard operation
argo-cd copied to clipboard

Resources that are NOT managed with ArgoCD are always OutOfSync

Open eltalkarim opened this issue 3 years ago • 1 comments

Summary

We currently rely on ArgoCD to apply most of our Kubernetes resources. However, we have a couple of them that are managed with Terraform for a custom use case. Currently, we are adding the following label so that ArgoCD can display the resource to have a holistic view over the applied resources. Moreover, we are adding annotations so that it does not try to prune it or affect the overall sync status of the application:

annotations = {
    "argocd.argoproj.io/compare-options" : "IgnoreExtraneous"
    "argocd.argoproj.io/sync-options" : "Prune=false"
  }


  labels = {
    # needs to match application name in ArgoCD
    "argocd.argoproj.io/instance" : <APP NAME>
}

Motivation

Some Kubernetes environments rely on different ways to apply the resources. ArgoCD can display them without affecting the overall sync status of the application. Yet, the custom resource will always show that it is out of sync, and it requires pruning.

Proposal

Introduce an annotation that will ignore any diff for a certain resource.

eltalkarim avatar Aug 01 '22 13:08 eltalkarim

@eltalkarim Refer below doc https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/#repositories:~:text=tlsClientCertKey%3A%20...-,Resource%20Exclusion/Inclusion,%C2%B6,-Resources%20can%20be

VishnuPrasad-Xyram avatar Sep 13 '22 13:09 VishnuPrasad-Xyram