helm-charts
helm-charts copied to clipboard
[ISSUE] Database On Alternate Port Does Not Work
Have a look at Troubleshooting or some Common Issues
Describe the bug Running the database on a port different than the default postgres port will not start.
To Reproduce test 1:
- change port in values from 5432 to 5434. load balancer: false
test 2:
- Update instances of 5432 to 5434 (and optionally 6432 to 6434) in the values.yaml
- Update values.schema.yaml and all yaml with the same values in templates/ directory.
Deploy the chart.
Pod fails to start due to pg_isready checking the wrong port for readiness
Expected behavior Database starts up and is accessible on the alternate port (5434).
Additional context
The fix: add - --port=<port number>
to pg_isready
args in templates/statefulset-timescaledb.yaml
This whole setup should be easier to change the port value in values.yaml and have it propagate to all configuration items that are relevant.
Currently more than just the values.yaml has to be edited, which then requires creating a local version of the chart, which then opens up a maintenance error potential of version skew with the original chart.
Could you provide some more information, including the full values.yaml
?
This is because port can be specified at different levels. This Chart does not support changing the Port of the PostgreSQL instance, however it does support changing the Port of the service.
I probably should have opened an issue and a feature request.
The issue:
- original values.yaml with the following changes:
- loadBalancer.enabled: false
- loadBalancer.port: 5434
- replicaLoadBalancer.enabled: false
- replicaLoadBalancer.port: 5434
- install chart
- headless service is present on 5434, postgres server on 5432
- postgres pod fails to get to Ready. Error is readiness probe could not find postgres. Appeared that the pg_isready() looks at the kubernetes service address/port vs the pod's port. Adding '--port=5434' to pg_isready() fixed the error.