argoproj / argo-cd

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

pre-diff normalization failure with omitted fields #19402

Closed sstarcher closed 2 months ago

sstarcher commented 2 months ago

Describe the bug

deploying kube-prometheus-stack with argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true

Looks to fail without the compare-options also.

Expected behavior

Sync works

Version

2.10.14

Logs

        Failed to compare desired state to live state: failed to perform
        pre-diff normalization: error building typed results: error creating
        typedConfig: .spec.containers[1].ports: element 0: associative list with
        keys has an element that omits key field "protocol" (and doesn't have
        default value)
dakr0013 commented 2 months ago

I have a similar problem. I deploy renovate with helm chart. I get similar error message:

Failed to compare desired state to live state: failed to perform pre-diff normalization: error building typed results: error creating typedLive: .status: field not declared in schema

I figured out that it is NetworkPolicy which causes the problem for me.

alexmt commented 2 months ago

Fixed by https://github.com/argoproj/argo-cd/pull/19714