argoproj / argo-cd

Declarative Continuous Deployment for Kubernetes
https://argo-cd.readthedocs.io
Apache License 2.0
17.92k stars 5.46k forks source link

SkipDryRunOnMissingResource doesn't work #11374

Open IvanovOleg opened 1 year ago

IvanovOleg commented 1 year ago

Checklist:

Describe the bug

I am configuring an istio virtualservice for the ArgoCD. Resource configuration located in the same sync. Since istio is not installed yet, I need to skip virtualservice. I decided to add the argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true annotation to the virtualservice manifest as described below.

To Reproduce

apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
  name: argocd-server
  annotations:
    argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
spec:
  hosts:
    - argocd.dev.example.com
  gateways:
    - istio-gateway/istio-gateway
  http:
    - route:
      - destination:
          host: argocd-server
          port:
            number: 80

Expected behavior

Application is in sync

Screenshots

Version

argocd: v2.5.2+148d8da
  GitCommit: 148d8da7a996f6c9f4d102fdd8e688c2ff3fd8c7
  GitTreeState: clean
  GoVersion: go1.18.7
  Compiler: gc
  Platform: linux/amd64
argocd-server: v2.5.2+
  GitCommit: 148d8da7a996f6c9f4d102fdd8e688c2ff3fd8c7
  GitTreeState: clean
  GoVersion: go1.[18]
  Compiler: gc
  Platform: linux/amd64
  Kustomize Version: v4.5.7 [20]
  Helm Version: v3.10.1+g9f88ccb
  Kubectl Version: v0.[24]

Logs

If annotation exists, I am getting:

networking.istio.io        VirtualService            argocd     argocd-server                                    OutOfSync  Missing        the server could not find the requested resource
time="2022-11-19T19:43:16Z" level=fatal msg="Operation has completed with phase: Failed"

If annotation is missing, I am getting:

one or more objects failed to apply, reason: resource mapping not found for name: "argocd-server" namespace: "argocd" from "/dev/shm/3650978948": no matches for kind "VirtualService" in version "networking.istio.io/v1beta1"
ghost commented 1 year ago

any updates on this one?

ArsenyBelorukov commented 1 year ago

The application should be OutOfSync, this annotation gives the ability to sync other resources in the application.