Skip to content

Commit

Permalink
chore(deps): upgrade envoy to 1.24.8 (#6968)
Browse files Browse the repository at this point in the history
Signed-off-by: Łukasz Dziedziak <[email protected]>
  • Loading branch information
lukidzi authored Jun 20, 2023
1 parent e469668 commit 661a7eb
Show file tree
Hide file tree
Showing 25 changed files with 50 additions and 441 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ include mk/kind.mk
include mk/k3d.mk
include mk/e2e.new.mk
include mk/docs.mk
include mk/envoy.mk
18 changes: 18 additions & 0 deletions mk/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ LD_FLAGS := -ldflags="-s -w $(build_info_ld_flags) $(EXTRA_LD_FLAGS)"
CGO_ENABLED := 0
GOFLAGS :=

ENVOY_DISTRO ?= $(GOOS)

TOP := $(shell pwd)
BUILD_DIR ?= $(TOP)/build
BUILD_ARTIFACTS_DIR ?= $(BUILD_DIR)/artifacts-${GOOS}-${GOARCH}
Expand Down Expand Up @@ -104,6 +106,14 @@ else
@echo "CoreDNS is already built. If you want to rebuild it, remove the binary: rm $(BUILD_ARTIFACTS_DIR)/coredns/coredns"
endif

.PHONY: build/envoy
build/envoy:
mkdir -p $(BUILD_ARTIFACTS_DIR)/envoy && \
if [ ! -f $(BUILD_ARTIFACTS_DIR)/envoy/envoy-$(ENVOY_DISTRO) ]; then \
curl -s --fail --location https://github.com/kumahq/envoy-builds/releases/download/v$(ENVOY_VERSION)/envoy-$(ENVOY_DISTRO)-$(GOARCH)-v$(ENVOY_VERSION)$(ENVOY_EXT_$(GOOS)_$(GOARCH)).tar.gz | tar -C $(BUILD_ARTIFACTS_DIR)/envoy -xz; \
mv $(BUILD_ARTIFACTS_DIR)/envoy/envoy $(BUILD_ARTIFACTS_DIR)/envoy/envoy-$(ENVOY_DISTRO); \
fi

.PHONY: build/test-server
build/test-server: ## Dev: Build `test-server` binary
$(Build_Go_Application) ./test/server
Expand Down Expand Up @@ -164,6 +174,14 @@ build/test-server/linux-amd64:
build/test-server/linux-arm64:
GOOS=linux GOARCH=arm64 $(MAKE) build/test-server

.PHONY: build/envoy/linux-amd64
build/envoy/linux-amd64:
GOOS=linux GOARCH=amd64 $(MAKE) build/envoy

.PHONY: build/envoy/linux-arm64
build/envoy/linux-arm64:
GOOS=linux GOARCH=arm64 $(MAKE) build/envoy

.PHONY: clean
clean: clean/build ## Dev: Clean

Expand Down
2 changes: 1 addition & 1 deletion mk/dependencies/deps.lock
Original file line number Diff line number Diff line change
@@ -1 +1 @@
78b7c50b319d5c3c039973a3ad5eb6daabb40c3e
b947e31d1aa93810696d5fe750c8c7b448228531
7 changes: 4 additions & 3 deletions mk/dev.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
KUMA_DIR ?= .
ENVOY_VERSION = $(shell ${KUMA_DIR}/tools/envoy/version.sh)
CI_TOOLS_VERSION = $(word 6, $(shell ${KUMA_DIR}/tools/releases/version.sh))
TOOLS_DIR ?= $(KUMA_DIR)/tools
BUILD_INFO := $(shell $(TOOLS_DIR)/releases/version.sh)
ENVOY_VERSION = $(word 5, $(BUILD_INFO))
CI_TOOLS_VERSION = $(word 6, $(BUILD_INFO))
KUMA_CHARTS_URL ?= https://kumahq.github.io/charts
CHART_REPO_NAME ?= kuma
PROJECT_NAME ?= kuma
Expand All @@ -25,7 +27,6 @@ KUBECONFIG_DIR := $(HOME)/.kube

PROTOS_DEPS_PATH=$(CI_TOOLS_DIR)/protos

TOOLS_DIR ?= $(KUMA_DIR)/tools
CLANG_FORMAT=$(CI_TOOLS_BIN_DIR)/clang-format
HELM=$(CI_TOOLS_BIN_DIR)/helm
K3D_BIN=$(CI_TOOLS_BIN_DIR)/k3d
Expand Down
6 changes: 3 additions & 3 deletions mk/docker.mk
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ image/kuma-cp: build/kuma-cp/linux-${GOARCH} ## Dev: Rebuild `kuma-cp` Docker im
docker build -t $(KUMA_CP_DOCKER_IMAGE) ${DOCKER_BUILD_ARGS} --build-arg ARCH=${GOARCH} --build-arg BASE_IMAGE_ARCH=${GOARCH} -f tools/releases/dockerfiles/Dockerfile.kuma-cp .

.PHONY: image/kuma-dp
image/kuma-dp: build/kuma-dp/linux-${GOARCH} build/coredns/linux-${GOARCH} build/artifacts-linux-${GOARCH}/envoy/envoy ## Dev: Rebuild `kuma-dp` Docker image
docker build -t $(KUMA_DP_DOCKER_IMAGE) ${DOCKER_BUILD_ARGS} --build-arg ARCH=${GOARCH} --build-arg BASE_IMAGE_ARCH=${GOARCH} --build-arg ENVOY_VERSION=${ENVOY_VERSION} -f tools/releases/dockerfiles/Dockerfile.kuma-dp .
image/kuma-dp: build/kuma-dp/linux-${GOARCH} build/coredns/linux-${GOARCH} build/envoy/linux-${GOARCH} ## Dev: Rebuild `kuma-dp` Docker image
docker build -t $(KUMA_DP_DOCKER_IMAGE) ${DOCKER_BUILD_ARGS} --build-arg ARCH=${GOARCH} --build-arg BASE_IMAGE_ARCH=${GOARCH} -f tools/releases/dockerfiles/Dockerfile.kuma-dp .

.PHONY: image/kumactl
image/kumactl: build/kumactl/linux-${GOARCH} ## Dev: Rebuild `kumactl` Docker image
Expand All @@ -49,7 +49,7 @@ image/kuma-cni: build/kuma-cni/linux-${GOARCH} build/install-cni/linux-${GOARCH}

.PHONY: image/kuma-universal
image/kuma-universal: build/linux-${GOARCH}
docker build -t $(KUMA_UNIVERSAL_DOCKER_IMAGE) ${DOCKER_BUILD_ARGS} --build-arg ARCH=${GOARCH} --build-arg ENVOY_VERSION=${ENVOY_VERSION} --build-arg BASE_IMAGE_ARCH=${GOARCH} -f test/dockerfiles/Dockerfile.universal .
docker build -t $(KUMA_UNIVERSAL_DOCKER_IMAGE) ${DOCKER_BUILD_ARGS} --build-arg ARCH=${GOARCH} --build-arg BASE_IMAGE_ARCH=${GOARCH} -f test/dockerfiles/Dockerfile.universal .

.PHONY: images
images: $(IMAGES_TARGETS) ## Dev: Rebuild release and test Docker images
Expand Down
58 changes: 0 additions & 58 deletions mk/envoy.mk

This file was deleted.

4 changes: 2 additions & 2 deletions test/dockerfiles/Dockerfile.universal
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ RUN ssh-keygen -A \
&& chmod a+rwx /root \
&& useradd -U kuma-dp

ARG ENVOY_DISTRO=linux
ARG ARCH
ARG ENVOY_VERSION

ADD /build/artifacts-linux-$ARCH/kuma-cp/kuma-cp /usr/bin
ADD /build/artifacts-linux-$ARCH/kuma-dp/kuma-dp /usr/bin
ADD /build/artifacts-linux-$ARCH/envoy/envoy-$ENVOY_VERSION-alpine /usr/bin/envoy
ADD /build/artifacts-linux-$ARCH/envoy/envoy-${ENVOY_DISTRO} /usr/bin/envoy
ADD /build/artifacts-linux-$ARCH/coredns/coredns /usr/bin
ADD /build/artifacts-linux-$ARCH/kumactl/kumactl /usr/bin
ADD /build/artifacts-linux-$ARCH/test-server/test-server /usr/bin
Expand Down
23 changes: 13 additions & 10 deletions test/e2e_env/universal/healthcheck/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,12 @@ conf:

It("should mark host as unhealthy if it doesn't reply on health checks when Permissive mTLS enabled", func() {
// check that test-server-mtls is healthy
cmd := []string{"/bin/bash", "-c", "\"echo request | nc test-server-mtls.mesh 80\""}
stdout, _, err := env.Cluster.ExecWithRetries("", "", "dp-demo-client-mtls", cmd...)
Expect(err).ToNot(HaveOccurred())
Expect(stdout).To(ContainSubstring("response"))
Eventually(func(g Gomega) {
cmd := []string{"/bin/bash", "-c", "\"echo request | nc test-server-mtls.mesh 80\""}
stdout, _, err := env.Cluster.Exec("", "", "dp-demo-client-mtls", cmd...)
g.Expect(err).ToNot(HaveOccurred())
g.Expect(stdout).To(ContainSubstring("response"))
}).Should(Succeed())

// update HealthCheck policy to check for another 'recv' line
Expect(YamlUniversal(healthCheck(meshName, "test-server-mtls", "foo", "baz"))(env.Cluster)).To(Succeed())
Expand All @@ -243,12 +245,13 @@ conf:
return strings.Contains(stdout, "health_flags::/failed_active_hc")
}, "30s", "500ms").Should(BeTrue())

cmd = []string{"/bin/bash", "-c", "\"echo request | nc test-server-mtls.mesh 80\""}
stdout, _, _ = env.Cluster.ExecWithRetries("", "", "dp-demo-client-mtls", cmd...)

// there is no real attempt to setup a connection with test-server, but Envoy may return either
// empty response with EXIT_CODE = 0, or 'Ncat: Connection reset by peer.' with EXIT_CODE = 1
Expect(stdout).To(Or(BeEmpty(), ContainSubstring("Ncat: Connection reset by peer.")))
Consistently(func(g Gomega) {
cmd := []string{"/bin/bash", "-c", "\"echo request | nc test-server-mtls.mesh 80\""}
stdout, _, _ := env.Cluster.Exec("", "", "dp-demo-client-mtls", cmd...)
// there is no real attempt to setup a connection with test-server, but Envoy may return either
// empty response with EXIT_CODE = 0, or 'Ncat: Connection reset by peer.' with EXIT_CODE = 1
g.Expect(stdout).To(Or(BeEmpty(), ContainSubstring("Ncat: Connection reset by peer.")))
}).Should(Succeed())
})
}, Ordered)
}
10 changes: 0 additions & 10 deletions tools/envoy/Dockerfile.build-centos

This file was deleted.

3 changes: 0 additions & 3 deletions tools/envoy/Dockerfile.build-centos.dockerignore

This file was deleted.

16 changes: 0 additions & 16 deletions tools/envoy/Dockerfile.build-ubuntu

This file was deleted.

3 changes: 0 additions & 3 deletions tools/envoy/Dockerfile.build-ubuntu.dockerignore

This file was deleted.

44 changes: 0 additions & 44 deletions tools/envoy/README.md

This file was deleted.

40 changes: 0 additions & 40 deletions tools/envoy/build_centos.sh

This file was deleted.

35 changes: 0 additions & 35 deletions tools/envoy/build_darwin.sh

This file was deleted.

42 changes: 0 additions & 42 deletions tools/envoy/build_linux.sh

This file was deleted.

Loading

0 comments on commit 661a7eb

Please sign in to comment.