Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
k8s-ingress
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
uplex-varnish
k8s-ingress
Commits
fc08c9bf
Commit
fc08c9bf
authored
May 28, 2021
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update haproxy dataplaneapi to version 2.3.1.
Closes #42
parent
2e4575bf
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
84 additions
and
14 deletions
+84
-14
Dockerfile.haproxy
container/Dockerfile.haproxy
+10
-8
haproxy.cfg
container/haproxy.cfg
+1
-1
go.mod
go.mod
+4
-2
go.sum
go.sum
+66
-0
dataplane.go
pkg/haproxy/dataplane.go
+3
-3
No files found.
container/Dockerfile.haproxy
View file @
fc08c9bf
ARG go_version=1.15
ARG debian_tag=10.9-slim
ARG dataplane_version=v2.3.1
# Build k8s-crt-dnldr in the builder stage
FROM golang:${go_version} as builder
...
...
@@ -11,33 +12,34 @@ RUN go get -d -v code.uplex.de/k8s/k8s-crt-dnldr/cmd
RUN cd /go/src/code.uplex.de/k8s/k8s-crt-dnldr && make k8s-crt-dnldr
RUN cd /go && git clone https://github.com/haproxytech/dataplaneapi.git && \
cd /go/dataplaneapi && git checkout ${dataplane_version} && make build
# Build haproxy
FROM debian:${debian_tag}
COPY buster-backports.list /etc/apt/sources.list.d/
ARG haproxy_version=2.2.9-1~bpo10+1
ARG dataplane_version=v1.2.4
RUN apt-get update -q &&
apt-get install -y -q curl &&
\
RUN apt-get update -q && \
apt-get install -y -q haproxy=${haproxy_version} && \
curl -L http://github.com/haproxytech/dataplaneapi/releases/download/${dataplane_version}/dataplaneapi -o /usr/bin/dataplaneapi && \
/bin/chmod 755 /usr/bin/dataplaneapi && \
apt-get install -y -q procps && \
apt-get remove -y -q curl && apt-get autoremove -y -q && apt-get clean && \
apt-get autoremove -y -q && apt-get clean && \
rm -rf /var/lib/apt/lists/* && rm -rf /etc/haproxy/errors && \
rm -rf /usr/share/doc && rm -rf /usr/share/man
COPY --from=builder /go/src/code.uplex.de/k8s/k8s-crt-dnldr/k8s-crt-dnldr /usr/bin/
COPY --from=builder /go/dataplaneapi/build/dataplaneapi /usr/bin/
COPY haproxy.cfg /etc/haproxy/
RUN /bin/chmod 755 /usr/bin/dataplaneapi
# GID 998 is the varnish group in the varnish container.
RUN /bin/mkdir
/run/haproxy/
&& \
RUN /bin/mkdir
-p /run/haproxy/spoe
&& \
/usr/sbin/groupadd -g 998 varnish && \
/usr/sbin/usermod -G varnish -g varnish -u 102 haproxy && \
/bin/chgrp varnish /run/haproxy && \
/bin/chmod 775 /run/haproxy
/bin/chgrp
-R
varnish /run/haproxy && \
/bin/chmod
-R
775 /run/haproxy
COPY haproxy_exec.sh /
RUN /bin/chmod 755 /haproxy_exec.sh /usr/bin/k8s-crt-dnldr
...
...
container/haproxy.cfg
View file @
fc08c9bf
...
...
@@ -28,7 +28,7 @@ userlist controller
user dataplaneapi insecure-password %%SECRET_DATAPLANEAPI%%
program api
command /usr/bin/dataplaneapi --host=0.0.0.0 --port=5555 --haproxy-bin /usr/sbin/haproxy --reload-cmd "/bin/kill -SIGUSR2 1" -i --log-to=stdout --log-level=info
command /usr/bin/dataplaneapi --host=0.0.0.0 --port=5555 --haproxy-bin /usr/sbin/haproxy --reload-cmd "/bin/kill -SIGUSR2 1" -i --log-to=stdout --log-level=info
-f=/run/haproxy/dataplaneapi.hcl -c /run/haproxy/haproxy.cfg -p /run/haproxy/maps --ssl-certs-dir=/etc/ssl/private --spoe-dir=/run/haproxy/spoe
no option start-on-reload
program crt-dnldr
...
...
go.mod
View file @
fc08c9bf
...
...
@@ -5,8 +5,10 @@ go 1.15
require (
code.uplex.de/uplex-varnish/varnishapi v0.0.0-20191205154529-31e610a4139d
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883
github.com/go-openapi/spec v0.19.2 // indirect
github.com/go-openapi/strfmt v0.19.0
github.com/go-openapi/errors v0.19.4 // indirect
github.com/go-openapi/strfmt v0.19.5
github.com/go-openapi/swag v0.19.9 // indirect
github.com/go-openapi/validate v0.19.8 // indirect
github.com/golang/groupcache v0.0.0-20181024230925-c65c006176ff // indirect
github.com/google/go-cmp v0.3.0
github.com/googleapis/gnostic v0.2.0 // indirect
...
...
go.sum
View file @
fc08c9bf
This diff is collapsed.
Click to expand it.
pkg/haproxy/dataplane.go
View file @
fc08c9bf
...
...
@@ -47,9 +47,9 @@ var fmts = strfmt.NewFormats()
const
(
dataplaneUser
=
"dataplaneapi"
txPath
=
"/v
1
/services/haproxy/transactions"
sitesPath
=
"/v
1
/services/haproxy/sites"
reloadsPath
=
"/v
1
/services/haproxy/reloads"
txPath
=
"/v
2
/services/haproxy/transactions"
sitesPath
=
"/v
2
/services/haproxy/sites"
reloadsPath
=
"/v
2
/services/haproxy/reloads"
versionHdr
=
"Configuration-Version"
reloadIDHdr
=
"Reload-ID"
varnishSock
=
"unix@/varnish.sock"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment