skupperproject / skupper

Skupper is an implementation of a Virtual Application Network, enabling rich hybrid cloud communication.
http://skupper.io
Apache License 2.0
595 stars 74 forks source link

[v2] SecuredAccessManager - securedaccess endpoints missing port #1720

Closed c-kruse closed 1 month ago

c-kruse commented 1 month ago

Describe the bug With a secured access of type nodePort the endpoints sometimes end up with port set to zero. I think this is a simple case of the manager squashing the nodePort field during the reconcile step - maybe even a slight data race.

[christian@rh skupper-ci-playground] (fasterci *)$ k get securedaccesses.skupper.io skupper-router-1 -oyaml | yq '{"spec": .spec, "statusEndpoints": .status.endpoints}'
spec:
  accessType: nodeport
  certificate: skupper-site-server
  issuer: skupper-site-ca
  ports:
    - name: inter-router
      port: 55671
      protocol: TCP
      targetPort: 55671
    - name: edge
      port: 45671
      protocol: TCP
      targetPort: 45671
  selector:
    skupper.io/component: router
    skupper.io/group: skupper-router
statusEndpoints:
  - host: host.skupper-dev.testing
    name: inter-router
    port: "0"
  - host: host.skupper-dev.testing
    name: edge
    port: "0"
[christian@rh skupper-ci-playground] (fasterci *)$ ^C
[christian@rh skupper-ci-playground] (fasterci *)$ k get svc skupper-router-1
NAME               TYPE       CLUSTER-IP     EXTERNAL-IP   PORT(S)                           AGE
skupper-router-1   NodePort   10.96.39.145   <none>        55671:31216/TCP,45671:31147/TCP   7m19s

How To Reproduce

enable nodeport access types and create a site with accessType: nodeport. Wait around a few minutes and check once in a while.