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

[bitnami/nats] client-svc not compatible with Istio #5999

Closed
sarg3nt opened this issue Apr 2, 2021 · 5 comments · Fixed by #6015
Closed

[bitnami/nats] client-svc not compatible with Istio #5999

sarg3nt opened this issue Apr 2, 2021 · 5 comments · Fixed by #6015

Comments

@sarg3nt
Copy link
Contributor

sarg3nt commented Apr 2, 2021

Current chart sets the service port name to client, this does not allow istio to configure properly to the port.
https://github.com/bitnami/charts/blob/master/bitnami/nats/templates/client-svc.yaml
Changing the port name to tcp fixes this and allows Istio to route traffic to the service over MTLS properly.
From:

spec:
  clusterIP: 10.43.72.78
  clusterIPs:
  - 10.43.72.78
  ports:
  - name: client
    port: 4222
    protocol: TCP
    targetPort: client

To:

spec:
  clusterIP: 10.43.72.78
  clusterIPs:
  - 10.43.72.78
  ports:
  - name: tcp
    port: 4222
    protocol: TCP
    targetPort: client

See: nats-io/nats-operator#88
I don't think there is any reason to have the port name match the service name.
It would probably be wise to change all of the services port names to tcp
i.e.

  • client-svc.yaml
  • cluster-svc.yaml
  • headless-svc.yaml
  • metrics-svc.yaml
  • monitoring-svc.yaml

Versions:
Istio 1.8.300
nats: bitnami 6.2.3 (latest as of the time of this writing)

@miguelaeh
Copy link
Contributor

Hi @dsargent3220 ,
Would you like to create a PR? I think it would be better to call it tcp-client which I think is also Istio compatible.

I don't think there is any reason to have the port name match the service name.

There isn't, it is just a kind of consistency

@sarg3nt
Copy link
Contributor Author

sarg3nt commented Apr 5, 2021

I'll try tcp-client locally to see if that works. If so, I can do a PR.

@sarg3nt
Copy link
Contributor Author

sarg3nt commented Apr 5, 2021

Yep, that works. I'll start working on the PR.

@sarg3nt
Copy link
Contributor Author

sarg3nt commented Apr 5, 2021

Hi @miguelaeh Done, PR is here:
#6015

@miguelaeh
Copy link
Contributor

Thank you very much!
A colleague is already taking care of it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants