Closed sagimann closed 1 year ago
To achieve what you want, when installing the chart, you could pass inputs like:
auth:
username: "user"
password: "user"
service:
ports:
amqp: 5673
manager: 15673
containerPorts:
amqp: 5673
manager: 15673
extraEnvVars:
- name: RABBITMQ_NODE_PORT_NUMBER
value: "5673"
- name: RABBITMQ_MANAGEMENT_PORT_NUMBER
value: "15673"
extraConfiguration: |-
management.tcp.port = {{ .Values.containerPorts.manager }}
Then to test it:
$ kubectl logs mq-rabbitmq-0 | grep listener
2023-07-20 16:08:16.339104+00:00 [info] <0.648.0> Management plugin: HTTP (non-TLS) listener started on port 15673
2023-07-20 16:08:16.351180+00:00 [info] <0.750.0> started TCP listener on [::]:5673
$ k exec -it mq-rabbitmq-0 -- curl -I http://mq-rabbitmq-0:5673
$ k exec -it mq-rabbitmq-0 -- curl -I http://mq-rabbitmq-0:15673
HTTP/1.1 200 OK
However, I wonder if it wouldn't be simpler for you to just update the service configuration so the services get exposed in the desired ports and let the container ones untouched so you don't have to worry about the internal configuration. Is there any reason to not simply do this?
auth:
username: "user"
password: "user"
service:
ports:
amqp: 5673
manager: 15673
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.
Name and Version
12.0.4
What architecture are you using?
amd64
What steps will reproduce the bug?
helm install mq oci://registry-1.docker.io/bitnamicharts/rabbitmq -f values.yaml
$ kubectl get svc mq-rabbitmq -o yaml
showing only ports section:
ports:
Are you using any custom parameters or values?
values.yaml:
What is the expected behavior?
Rabbit MQ service should be accessible through the custom ports
What do you see instead?
Custom ports are not accessible and startup log shows the server is using the fefault ports (5672, 15672) - not the custom ones: