passbolt / charts-passbolt

Helm charts to run Passbolt on Kubernetes. No strings attached charts to run the open source password manager for teams!
https://passbolt.com
GNU Affero General Public License v3.0
40 stars 27 forks source link

Only https port being exposed when service is set to NodePort #87

Open vaaleyard opened 1 month ago

vaaleyard commented 1 month ago

I'm trying to expose the passbolt service as a NodePort, but when I set it, only the https port is exposed... I think that it's because it's the first port used in the service file: https://github.com/passbolt/charts-passbolt/blob/main/templates/service.yaml#L22

But I need the 80 port being exposed as well, so to add that I have to manually add the port in the yaml file with kubectl edit... Is there a way to expose both directly in the helm chart? Or in any way that I don't need to edit it manually?

To set as a nodeport I'm just using this setting:

service:
  type: NodePort
dlen commented 1 month ago

Hey @vaaleyard thanks for the report. This is some improvement to be done in the chart. The only workaround is to edit the template as you suggested at the moment.

vaaleyard commented 1 month ago

In case anyone needs it in the future, I'm automating it this way:

kubectl get service passbolt -o json | jq '.spec.ports += [{ "name": "http", "port": 80, "targetPort": 80 }]' | kubectl replace -f -

This will fetch the passbolt k8s service as json, add the port 80 to the ports array and replace the current service.