Closed SongGithub closed 3 years ago
I managed to fix the issue by adding following env-var to the runtime.
- name: PACT_BROKER_PORT_ENVIRONMENT_VARIABLE_NAME
value: PACT_BROKER_APPLICATION_PORT
because Port has been assigned this way:
- name: PACT_BROKER_APPLICATION_PORT
value: "9292"
But still, it is confusing to me how the app/Puma can start to consume the env-var PACT_BROKER_APPLICATION_PORT
correctly, with this annotation-like env-var PACT_BROKER_PORT_ENVIRONMENT_VARIABLE_NAME
? It sounds tricky.
nvm I managed to answer my above question in this doco. https://github.com/pact-foundation/pact-broker-docker/blob/ee2f93db03f04103378e83e6359a961c14a63f07/README.md#port
Yep, there is an explicit section that deals with this for Kubernetes: https://github.com/pact-foundation/pact-broker-docker/blob/ee2f93db03f04103378e83e6359a961c14a63f07/README.md#running-on-kubernetes.
Closing the issue as it seems you have a working solution.
Pre issue-raising checklist
I have already (please mark the applicable with an
x
):Software versions
Expected behaviour
application starts up normally
Actual behaviour
It blows up during startup process which is scripted in entrypoint.sh
bundle exec puma
. Error: bundler: failed to load command: puma (/pact_broker/vendor/bundle/ruby/2.6.0/bin/puma) ArgumentError: invalid value for Integer(): "tcp://172.20.79.244:80" /pact_broker/vendor/bundle/ruby/2.6.0/gems/puma-5.4.0/lib/puma/dsl.rb:260:inInteger' /pact_broker/vendor/bundle/ruby/2.6.0/gems/puma-5.4.0/lib/puma/dsl.rb:260:in
port'And the code blows up is /pact_broker/vendor/bundle/ruby/2.6.0/gems/puma-5.4.0/lib/puma/dsl.rb:260:
So it expects a port number in Integer, but it got an address. I am confused.
Steps to reproduce
env var provided:
Relevent log files
Please ensure you set logging to
DEBUG
and attach any relevant log files here (or link from a gist).