Details
I have already (please mark the applicable with an `x`):
Software versions
- pact-broker gem version: 2.34.0
- pact-broker docker version: 2.34.0-1
- OS: macOS 10.14.5 (18F132)
- using Docker for Mac 2.1.0.0 (Docker Engine 19.03.1 + docker-desktop Kubernetes v1.14.3)
Description of the issue
When creating a Deployment, kubernetes injects environment variables such as PACT_BROKER_PORT (this issue only appears when the deployment name is pact-broker)
% kubectl exec -n pact pact-6755d8cb98-jbdlm
[...]
PACT_BROKER_PORT=tcp://10.103.77.49:80
KUBERNETES_SERVICE_HOST=10.96.0.1
KUBERNETES_PORT_443_TCP_PORT=443
KUBERNETES_PORT_443_TCP_ADDR=10.96.0.1
PACT_BROKER_SERVICE_HOST=10.103.77.49
PACT_BROKER_PORT_80_TCP_PROTO=tcp
PACT_BROKER_PORT_80_TCP_PORT=80
PACT_BROKER_PORT_80_TCP_ADDR=10.103.77.49
KUBERNETES_PORT=tcp://10.96.0.1:443
KUBERNETES_PORT_443_TCP=tcp://10.96.0.1:443
PACT_BROKER_SERVICE_PORT=80
PACT_BROKER_PORT_80_TCP=tcp://10.103.77.49:80
KUBERNETES_SERVICE_PORT_HTTPS=443
KUBERNETES_SERVICE_PORT=443
KUBERNETES_PORT_443_TCP_PROTO=tcp
PACT_BROKER_SERVICE_PORT_80=80
Some of these conflict with what pact-broker expects: Kubernetes sets PACT_BROKER_PORT to tcp://10.103.77.49:80 but pact-broker expects 80 which gives the error:
Puma starting in single mode...
* Version 3.12.1 (ruby 2.6.3-p62), codename: Llamas in Pajamas
* Min threads: 0, max threads: 16
* Environment: production
URI::InvalidURIError: bad URI(is not URI?): "tcp://0.0.0.0:tcp://10.103.77.49:9292"
What is your thought on that?
Workaround
Change the deployment name from pact-broker to pact-broker2 for example.
Steps to reproduce
git clone https://github.com/maelvls/pact-broker-kubernetes --branch=pact-broker-docker-issue-7
cd pact-broker-kubernetes/kubernetes
ls *.yaml | xargs -L1 kubectl apply -f
Details
I have already (please mark the applicable with an `x`):Software versions
Description of the issue
When creating a Deployment, kubernetes injects environment variables such as
PACT_BROKER_PORT(this issue only appears when the deployment name ispact-broker)Some of these conflict with what pact-broker expects: Kubernetes sets
PACT_BROKER_PORTtotcp://10.103.77.49:80but pact-broker expects80which gives the error:What is your thought on that?
Workaround
Change the deployment name from
pact-brokertopact-broker2for example.Steps to reproduce