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

Server-Side Diff breaks Ingress modifications #21488

Open
3 tasks done
jocelynthode opened this issue Jan 14, 2025 · 0 comments
Open
3 tasks done

Server-Side Diff breaks Ingress modifications #21488

jocelynthode opened this issue Jan 14, 2025 · 0 comments

Comments

@jocelynthode
Copy link
Contributor

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

Due to us enabling strict-validate-path-type in ingress-nginx, we had to modify some PathType in our Ingresses managed by helm via argocd. However argocd breaks when server-side diff is enabled.

To Reproduce

  • Enable controller.diff.server.side: 'true'
  • Try to refresh an application based on a helm chart that has an ingress with a PathType change
  • ArgoCD fails with:
unmarshal error: invalid character '.' after top-level value


Failed to compare desired state to live state: failed to calculate diff: error calculating server side diff: serverSideDiff error: error converting json string to unstructured for resource Ingress/xxx: unmarshal error: invalid character '.' after top-level value

Here is an example Ingress where we have the issue:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    argocd.argoproj.io/tracking-id: xxx_xxx:networking.k8s.io/Ingress:xxx/xxx-vcs-healthz
    cert-manager.io/cluster-issuer: letsencrypt-prod
    cert-manager.io/private-key-algorithm: ECDSA
    ingressClassName: nginx
    nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
    nginx.ingress.kubernetes.io/whitelist-source-range: 0.0.0.0/0,::/0
  name: xxx-vcs-healthz
  namespace: xxx
spec:
  ingressClassName: nginx
  rules:
  - host: xxx.example.com
    http:
      paths:
      - backend:
          service:
            name: keda-interceptor
            port:
              number: 8080
        path: /vcs_branch_sha.txt
        pathType: Prefix
  tls:
  - hosts:
    - xxx.example.com
    secretName: xxx.example.com

Disabling the server-side diff via the annotation argocd.argoproj.io/compare-options: ServerSideDiff=false fixes the issue.

Expected behavior

ArgoCD should apply the resource with no issue

Version

{
    "Version": "v2.13.3+a25c8a0",
    "BuildDate": "2025-01-03T18:44:26Z",
    "GitCommit": "a25c8a0eef7830be0c2c9074c92dbea8ff23a962",
    "GitTreeState": "clean",
    "GoVersion": "go1.23.1",
    "Compiler": "gc",
    "Platform": "linux/amd64",
    "KustomizeVersion": "v5.4.3 2024-07-19T16:40:33Z",
    "HelmVersion": "v3.15.4+gfa9efb0",
    "KubectlVersion": "v0.31.0",
    "JsonnetVersion": "v0.20.0"
}
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

3 participants