From 54ccfeced41cc314e9dae8f229cda1ee78d856b4 Mon Sep 17 00:00:00 2001 From: Curt Bushko Date: Mon, 21 Nov 2022 15:46:06 +0000 Subject: [PATCH 1/3] backport of commit 9d0ea0452fec4946a130f2ed19069adfc6bc54f6 --- control-plane/Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/control-plane/Dockerfile b/control-plane/Dockerfile index 9ac4188c22..3e31c92ef6 100644 --- a/control-plane/Dockerfile +++ b/control-plane/Dockerfile @@ -11,10 +11,14 @@ # # =================================== +# go-discover builds the discover binary (which we don't currently publish +# either). +FROM golang:1.19.2-alpine as go-discover +RUN CGO_ENABLED=0 go install github.com/hashicorp/go-discover/cmd/discover@49f60c093101c9c5f6b04d5b1c80164251a761a6 + # dev copies the binary from a local build # ----------------------------------- # BIN_NAME is a requirement in the hashicorp docker github action - FROM alpine:3.16 AS dev # NAME and VERSION are the name of the software in releases.hashicorp.com @@ -43,6 +47,7 @@ RUN apk add --no-cache ca-certificates gnupg libcap openssl su-exec iputils libc RUN addgroup ${BIN_NAME} && \ adduser -S -G ${BIN_NAME} 100 +COPY --from=go-discover /go/bin/discover /bin/ COPY pkg/bin/linux_${TARGETARCH}/${BIN_NAME} /bin COPY cni/pkg/bin/linux_${TARGETARCH}/${CNI_BIN_NAME} /bin @@ -94,6 +99,7 @@ ARG TARGETARCH RUN addgroup ${BIN_NAME} && \ adduser -S -G ${BIN_NAME} 100 +COPY --from=go-discover /go/bin/discover /bin/ COPY dist/${TARGETOS}/${TARGETARCH}/${BIN_NAME} /bin/ COPY dist/cni/${TARGETOS}/${TARGETARCH}/${CNI_BIN_NAME} /bin/ @@ -155,6 +161,7 @@ RUN groupadd --gid 1000 ${BIN_NAME} && \ adduser --uid 100 --system -g ${BIN_NAME} ${BIN_NAME} && \ usermod -a -G root ${BIN_NAME} +COPY --from=go-discover /go/bin/discover /bin/ COPY dist/${TARGETOS}/${TARGETARCH}/${BIN_NAME} /bin/ COPY dist/cni/${TARGETOS}/${TARGETARCH}/${CNI_BIN_NAME} /bin/ From e4cbcc6cc9fb3fd9037f8be4d27905a9d112ba91 Mon Sep 17 00:00:00 2001 From: Curt Bushko Date: Mon, 21 Nov 2022 15:54:30 +0000 Subject: [PATCH 2/3] backport of commit 40c1024b8678895036e8ee18c6c538acad6f59e3 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8565dd7e95..32ba7db1c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ ## UNRELEASED BUG FIXES: +* Control Plane + * Add go-discover binary to control-plane image [[GH-1749](https://github.com/hashicorp/consul-k8s/pull/1749)] * Helm: * Don't pass in a CA file to the API Gateway controller when `externalServers.useSystemRoots` is `true`. [[GH-1743](https://github.com/hashicorp/consul-k8s/pull/1743)] From 4bf6e9b64af3b111d2e10b559de1ff04470ee884 Mon Sep 17 00:00:00 2001 From: Curt Bushko Date: Mon, 21 Nov 2022 16:16:29 +0000 Subject: [PATCH 3/3] backport of commit c6070da59db14abde1be1913aa0d22ea2d47bc18 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32ba7db1c2..4b10f3be33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ BUG FIXES: * Control Plane - * Add go-discover binary to control-plane image [[GH-1749](https://github.com/hashicorp/consul-k8s/pull/1749)] + * Add discover binary to control-plane image [[GH-1749](https://github.com/hashicorp/consul-k8s/pull/1749)] * Helm: * Don't pass in a CA file to the API Gateway controller when `externalServers.useSystemRoots` is `true`. [[GH-1743](https://github.com/hashicorp/consul-k8s/pull/1743)]