Argo-cd: Ignore existing resources for diffing

Created on 17 Apr 2019  路  8Comments  路  Source: argoproj/argo-cd

Is your feature request related to a problem? Please describe.
We are using velero (ark) schedule objects to automatically create backups. These backups are themselves objects that are created with an instance label (but in a different namespace) and shown in the application as out-of-sync.

Describe the solution you'd like
I'd like to be able to ignore resources in the cluster to avoid them marking the application as out of sync.

I hope I didn't misunderstand the existing functionality around resource exclusion, but I had no luck finding a solution for this particular problem. Thanks to the maintainers for this great software and all the hard work!

enhancement

All 8 comments

I tried various configurations, but as I understand it, resource exclusion as per documentation would still lead to resources not in config, but existing in the cluster marked as out-of-sync, which is the issue I'd like to avoid.

Or ist this unexpected? Maybe I got something wrong.

If resource is added to resource.exclusions list then ArgoCD don't even try to check it in the target cluster. I think it should help in your case, but this is rather workaround then solution. Once you add backup resource group/kind into to resource.exclusions the resources should disappear as long as you are not trying to deploy it as part of your application. @archnode Can you please try and let me know if it helped?

This is not the first time we are seeing this issue. Resources labeled with app.kubernetes.io/instance label and without ownerReferences confuses Argo CD. I see couple options to solve it:

  • use custom annotation instead of app.kubernetes.io/instance label
  • extend resource exclusion feature and allow to specify exclude resources per application

@jessesuen what do you think

Thank you for your response: I currently have following resource exclusions entry:

- apiGroups:
  - "*"
  kinds:
  - Backup
  clusters:
  - "*"

Quite loose to avoid namespacing issues, the kind of the resource is "Backup", but resources are still displaying.

I updated to the newest version and the problem seems to have disappeared!

@alexmt is this possible to do this per application?

This is not the first time we are seeing this issue. Resources labeled with app.kubernetes.io/instance label and without ownerReferences confuses Argo CD. I see couple options to solve it:

  • use custom annotation instead of app.kubernetes.io/instance label
  • extend resource exclusion feature and allow to specify exclude resources per application

@jessesuen what do you think

Thank you for your response: I currently have following resource exclusions entry:

- apiGroups:
  - "*"
  kinds:
  - Backup
  clusters:
  - "*"

Quite loose to avoid namespacing issues, the kind of the resource is "Backup", but resources are still displaying.

- apiGroups:
  - "velero.io"
  kinds:
  - Backup
  clusters:
  - "*"

Works for me as well

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chiragthaker picture chiragthaker  路  3Comments

peterbosalliandercom picture peterbosalliandercom  路  3Comments

ksaito1125 picture ksaito1125  路  3Comments

clintberry picture clintberry  路  3Comments

estahn picture estahn  路  3Comments