Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(*) scripts for build, publish and fetch Envoy binaries #3110

Merged
merged 11 commits into from
Nov 17, 2021

Conversation

lobkovilya
Copy link
Contributor

Summary

Current PR introduces targets make build/envoy that allows to build and fetch Envoy binaries (see README.md).

Also, current PR changes the way kuma-dp image obtains Envoy binary. Previously we copied Envoy binary from envoyproxy/envoy-alpine image:

COPY --from=envoyproxy/envoy-alpine:v1.18.4 /usr/local/bin/envoy /usr/local/bin

Now we copy the binary from build/artifact-* directory:

ADD $KUMA_ROOT/build/artifacts-linux-amd64/envoy /usr/bin

In order for Envoy binary to appear in build/artifacts-* directory, we must call make build/artifacts-darwin-amd64/envoy target. This is not a .PHONY target which means it won't run if binary already exists.

Target build/artifacts-%-amd64/envoy runs in 2 modes: fetch required binary from download.konghq.com or build the binary from source code. Modes could be switched using BUILD_ENVOY_FROM_SOURCES variable, default behavior is fetching so BUILD_ENVOY_FROM_SOURCES=false.

Note: This PR doesn't affect CI or change the Envoy version. These changes will be presented in another PRs.

Full changelog

  • kuma-dp and kuma-universal images are built using Envoy binary fetched from download.konghq.com

Issues resolved

N/A

Documentation

Testing

  • Unit tests
  • E2E tests
  • Manual testing on Universal
  • Manual testing on Kubernetes

Backwards compatibility

  • Add backport-to-stable label if the code is backwards compatible. Otherwise, list breaking changes.

…g Envoy binaries

Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
@lobkovilya lobkovilya requested a review from a team as a code owner November 9, 2021 14:43
Copy link
Contributor

@michaelbeaumont michaelbeaumont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the uploading of the binaries also be covered in the next PR?

tools/envoy/fetch.sh Outdated Show resolved Hide resolved
@jpeach
Copy link
Contributor

jpeach commented Nov 9, 2021

xref #2627

tools/envoy/build_centos7.sh Outdated Show resolved Hide resolved
tools/envoy/fetch.sh Outdated Show resolved Hide resolved
tools/envoy/fetch.sh Outdated Show resolved Hide resolved
tools/envoy/fetch.sh Outdated Show resolved Hide resolved
tools/envoy/fetch_sources.sh Show resolved Hide resolved
tools/envoy/fetch_sources.sh Outdated Show resolved Hide resolved
tools/envoy/README.md Outdated Show resolved Hide resolved
tools/envoy/publish.sh Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
@codecov-commenter
Copy link

codecov-commenter commented Nov 12, 2021

Codecov Report

Merging #3110 (cac3c55) into master (1f507fd) will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3110      +/-   ##
==========================================
+ Coverage   52.35%   52.36%   +0.01%     
==========================================
  Files         919      919              
  Lines       53208    53208              
==========================================
+ Hits        27855    27864       +9     
+ Misses      23124    23123       -1     
+ Partials     2229     2221       -8     
Impacted Files Coverage Δ
pkg/core/resources/manager/cache.go 85.71% <0.00%> (-2.60%) ⬇️
pkg/core/runtime/reports/reports.go 51.81% <0.00%> (-1.82%) ⬇️
pkg/plugins/resources/postgres/store.go 75.52% <0.00%> (+0.84%) ⬆️
pkg/core/managers/apis/mesh/mesh_manager.go 49.38% <0.00%> (+2.46%) ⬆️
pkg/defaults/mesh/mesh.go 77.77% <0.00%> (+3.70%) ⬆️
pkg/defaults/components.go 92.15% <0.00%> (+3.92%) ⬆️
pkg/defaults/mesh/signing_key.go 76.47% <0.00%> (+11.76%) ⬆️
pkg/defaults/mesh.go 85.71% <0.00%> (+21.42%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1f507fd...cac3c55. Read the comment docs.

Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
mk/envoy.mk Outdated Show resolved Hide resolved
tools/envoy/build_centos7.sh Outdated Show resolved Hide resolved
tools/envoy/build_linux.sh Outdated Show resolved Hide resolved
tools/envoy/fetch_sources.sh Show resolved Hide resolved
tools/envoy/fetch.sh Show resolved Hide resolved
mk/envoy.mk Outdated Show resolved Hide resolved
tools/envoy/Dockerfile.build-centos7 Show resolved Hide resolved
tools/envoy/Dockerfile.build-ubuntu Show resolved Hide resolved
tools/envoy/fetch_sources.sh Show resolved Hide resolved
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Copy link
Contributor

@jpeach jpeach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just nits left. Overall, this is 🔥

Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
@lobkovilya lobkovilya merged commit 6f2071e into master Nov 17, 2021
@lobkovilya lobkovilya deleted the chore/envoy-build-scripts branch November 17, 2021 13:54
mergify bot pushed a commit that referenced this pull request Nov 18, 2021
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
(cherry picked from commit 6f2071e)
michaelbeaumont pushed a commit that referenced this pull request Nov 18, 2021
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
(cherry picked from commit 6f2071e)
bartsmykla pushed a commit that referenced this pull request Nov 18, 2021
…3182)

Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
(cherry picked from commit 6f2071e)

Co-authored-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants