I am attempting to run the HAProxy Data Plane API from a Docker container in Kubernetes and I have gotten to the point where the app is crashing with no logs whatsoever.
At first it was complaining about not having access to write in any of the directories which I could validate based on the permissions of the folder and everything belonging to the root user and group. I was able to surpass this by changing every directory to /tmp.
Now, being past all of those errors, whenever the Data Plane API starts up it will take down the entire running instance and I’m not sure why or how to fix it. I have attached the logs and my configuration at the bottom of this post.
I do not have permission to bind to privileged ports which is why I am binding to 8080 and 4443, although I perform a mapping to that port through its k8s service.
I am deploying this using helm and running the latest version of HAProxy.
Here is a copy of my config:
[NOTICE] (1) : New program 'api' (8) forked [NOTICE] (1) : New worker (9) forked [NOTICE] (1) : Loading success. configuration file /tmp/dataplaneapi.yml does not exists, creating one [NOTICE] (1) : haproxy version is 2.8.2-61a0f57 [ALERT] (1) : Current program 'api' (8) exited with code 1 (Exit) [ALERT] (1) : exit-on-failure: killing every processes with SIGTERM [ALERT] (1) : Current worker (9) exited with code 143 (Terminated) [WARNING] (1) : All workers exited. Exiting... (1) Stream closed EOF default/haproxy-6f9f7c6b6d-jwj5l (haproxy)
global log stdout format raw local0 debug maxconn 1024 master-worker stats socket /tmp/haproxy.sock mode 666 level admin userlist haproxy-dataplaneapi user admin insecure-password mypassword program api command /usr/local/bin/dataplaneapi --host 0.0.0.0 --port 5555 --haproxy-bin /usr/sbin/haproxy -f /tmp/dataplaneapi.yml --config-file /usr/local/etc/haproxy/haproxy.cfg --reload-cmd "kill -SIGUSR2 1" --reload-delay 5 --restart-cmd "kill -SIGUSR2 1" --userlist haproxy-dataplaneapi --maps-dir /tmp --backups-dir /tmp --ssl-certs-dir /tmp --general-storage-dir /tmp --spoe-dir /tmp --cluster-tls-dir /tmp --spoe-transaction-dir /tmp no option start-on-reload defaults mode http log global timeout client 60s timeout connect 60s timeout server 60s frontend fe_main bind :8080 default_backend default_response backend default_response http-request return content-type "text/plain" string "Hello World!"
Any help is greatly appreciated! Thank you.