Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignoreDifference not works with app in app pattern #19680

Open
3 tasks done
keyolk opened this issue Aug 26, 2024 · 2 comments
Open
3 tasks done

ignoreDifference not works with app in app pattern #19680

keyolk opened this issue Aug 26, 2024 · 2 comments

Comments

@keyolk
Copy link

keyolk commented Aug 26, 2024

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

Trying to ignore the TargetRevision field if the Application has a label ignoreTargetRevision: "true".
But from the Argocd UI, it always catches the diff.

To Reproduce

From the parent application

...
spec:
  ignoreDifferences:
  - group: argoproj.io/v1alpha1
    jqPathExpressions:
    - . | select(.metadata.labels.ignoreTargetRevision == "true") | .spec.source.targetRevision
    kind: Application
  source:
    syncOptions:
    - FailOnSharedResource=false
    - CreateNamespace=true
    - PrunePropagationPolicy=foreground
    - RespectIgnoreDifferences=true
...

And the child

...
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  labels:
    ignoreTargetRevision: "true"
...

Make it sure that if the child app has proper states.

$ cat child.yaml | yaml2json | jq ' . | select(.metadata.labels.ignoreTargetRevision == "true").spec.source.targetRevision'
"CPLAT-3112"

Expected behavior

The diff from targetRevision should be ignored from the parent application.

Screenshots

image

Version

argocd: v2.11.1+9f40df0
  BuildDate: 2024-05-21T22:43:41Z
  GitCommit: 9f40df0c29eca7e45a73f802f033dfd1ed0068e3
  GitTreeState: clean
  GoVersion: go1.22.3
  Compiler: gc
  Platform: darwin/amd64
argocd-server: v2.11.5+c4b283c
  BuildDate: 2024-07-15T17:39:54Z
  GitCommit: c4b283ce0c092aeda00c78ae7b3b2d3b28e7feec
  GitTreeState: clean
  GoVersion: go1.21.10
  Compiler: gc
  Platform: linux/arm64
  Kustomize Version: v5.2.1 2023-10-19T20:13:51Z
  Helm Version: v3.14.4+g81c902a
  Kubectl Version: v0.26.11
  Jsonnet Version: v0.20.0

Logs

No suspected logs I can see

@keyolk keyolk added the bug Something isn't working label Aug 26, 2024
@blakepettersson
Copy link
Member

Are you expecting that if the app-of-apps has ignoreDifferences set, that it should be reflected in all child applications?

@gavin-jeong
Copy link

gavin-jeong commented Sep 2, 2024

@blakepettersson No, what I'm trying is ignore the tagetRevision only if the application has specific label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants