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

ArgoCD doesnt see service as Out of Sync after manually adding another port #16771

Open
3 tasks done
ginokok1996 opened this issue Jan 8, 2024 · 1 comment
Open
3 tasks done

Comments

@ginokok1996
Copy link

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

We have a service that we manage with ArgoCD that has 1 port (8080) defined in the manifest file.
If we edit the manifest file by hand to add another port entry, ArgoCD doesn't see this difference and stays in sync.
We would expect that the diff on the live and desired manifest would show the newly added port.

To Reproduce

  1. Create the service with one port defined.
kind: Service
apiVersion: v1
metadata:
  name: component-dummy
  labels:
    app: component-dummy
spec:
  ports:
    - name: http
      protocol: TCP
      port: 8080
      targetPort: 8080
  selector:
    app: component-dummy
  type: ClusterIP
  1. After argoCD manages the service manually edit the service to add another port.
kind: Service
apiVersion: v1
metadata:
  name: component-dummy
  labels:
    app: component-dummy
spec:
  ports:
    - name: http
      protocol: TCP
      port: 8080
      targetPort: 8080
    - name: sidecar
      protocol: TCP
      port: 15020
      targetPort: 15020
  selector:
    app: component-dummy
  type: ClusterIP
  1. Check the argocd UI or via CLI to see that the service is still in sync

Expected behavior

Argocd notices the difference between the desired and live manifest of the service and goes out of sync because the ports are different

Version

argocd: v2.6.7+unknown
  BuildDate: 2023-05-10T05:05:38Z
  GitCommit: 
  GitTreeState: clean
  GoVersion: go1.18.10
  Compiler: gc
  Platform: linux/amd64
argocd-server: v2.6.13+unknown
  BuildDate: 2023-07-24T20:29:56Z
  GitTreeState: clean
  GoVersion: go1.18.10
  Compiler: gc
  Platform: linux/amd64
  Kustomize Version: v4.5.7 1970-01-01T00:00:00Z
  Helm Version: v3.10.0+ge534a5d
  Kubectl Version: v0.24.2
  Jsonnet Version: v0.19.1
@ginokok1996 ginokok1996 added the bug Something isn't working label Jan 8, 2024
@max06
Copy link

max06 commented Jan 10, 2024

I'm not sure but I think I might have encountered a similar issue: In my case I'm deploying pihole via helmchart. After deployment, I changed the values effectively causing a port configuration to change (adding another nodeport).

The desired manifest shows the correct render after the change:

          ports:
            - containerPort: 53
              hostPort: 53
              name: dns
              protocol: TCP
            - containerPort: 53
              hostPort: 53
              name: dns-udp
              protocol: UDP

while the live state differs:

          ports:
            - containerPort: 53
              hostPort: 53
              name: dns
              protocol: TCP
            - containerPort: 53
              name: dns-udp
              protocol: UDP

=> dns-udp has no nodeport. Argo insists the deployment (and all ressources) are in sync.

According to the helmchart, both hostPort-lines are based on the same condition. There's no difference in the template.

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