Skip to content

Commit

Permalink
K8SPXC-1335: Add hard-stop to haproxy global config (#893)
Browse files Browse the repository at this point in the history
  • Loading branch information
egegunes authored Dec 28, 2023
1 parent db73f12 commit 575165d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 4 additions & 6 deletions haproxy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
FROM golang:1.20 AS go_builder
WORKDIR /go/src/github.com/percona/percona-xtradb-cluster-operator/src

RUN export GO111MODULE=off \
&& go get k8s.io/apimachinery/pkg/util/sets \
&& curl -Lf -o /go/src/github.com/percona/percona-xtradb-cluster-operator/src/peer-list.go https://raw.githubusercontent.com/percona/percona-xtradb-cluster-operator/main/cmd/peer-list/main.go \
&& go build peer-list.go
RUN git clone --branch=main https://github.com/percona/percona-xtradb-cluster-operator.git /go/src/github.com/percona/percona-xtradb-cluster-operator/
WORKDIR /go/src/github.com/percona/percona-xtradb-cluster-operator/cmd/peer-list
RUN go build

FROM redhat/ubi9-minimal AS ubi9

Expand Down Expand Up @@ -59,7 +57,7 @@ COPY LICENSE /licenses/LICENSE.Dockerfile
RUN cp /usr/share/licenses/percona-haproxy/LICENSE /licenses/LICENSE.haproxy

COPY dockerdir /
COPY --from=go_builder /go/src/github.com/percona/percona-xtradb-cluster-operator/src/peer-list /usr/bin/
COPY --from=go_builder /go/src/github.com/percona/percona-xtradb-cluster-operator/cmd/peer-list /usr/bin/

RUN set -ex; \
chown 1001:1001 /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy-global.cfg /usr/local/bin/check_pxc.sh
Expand Down
1 change: 1 addition & 0 deletions haproxy/dockerdir/etc/haproxy/haproxy-global.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
maxconn 2048
external-check
insecure-fork-wanted
hard-stop-after 10s
stats socket /etc/haproxy/pxc/haproxy.sock mode 600 expose-fd listeners level admin

defaults
Expand Down

0 comments on commit 575165d

Please sign in to comment.