The Istio sidecar proxy image, built the way istio/proxy and istio/istio build it, with one addition: the GeoIP HTTP filter and its MaxMind provider are compiled into Envoy.
| Target | What it is |
|---|---|
//:envoy |
Envoy with Istio's extension set plus GeoIP |
//cmd/pilot-agent |
pilot-agent from istio/istio, built from source |
//:image |
the linux/amd64 + linux/arm64 image index |
//:image_test |
checks the image's config and files against testdata/image.yaml |
//:load |
loads the image into a local daemon as palermo/istio-proxy:latest |
//:push |
pushes the image as palermo/istio-proxy:<commit> |
The image has the files of istio/istio's distroless proxyv2 image at the same
paths, on the same base image.
Only Bazelisk is needed. The C++ toolchain (LLVM, libc++, sysroot), the Go SDK and the image tooling are downloaded by Bazel; nothing is taken from the host, and building and testing need no Docker daemon.
bazel test //... # both architectures, and the image test
bazel build --config=release //:envoy
bazel run //:loaduser.bazelrc is read if present and is not committed; put a remote cache
configuration there.
bazel run //:format # format Starlark, Go and shell
bazel run //:format.check # what CI runs: fails if a file would change
bazel build --config=lint //... # shellcheck on the scripts, as an aspect//:format uses buildifier (and applies its lint fixes), gofumpt and shfmt.
The Go analyzers of //:nogo run as part of every build of this repository's
Go packages, and a finding fails it. CI runs the format check, and builds with
--config=ci, where a shellcheck finding fails the build too. Files copied
verbatim from upstream are marked rules-lint-ignored in .gitattributes and
left as they are.
| Pin | Where |
|---|---|
| Envoy commit | ENVOY_SHA in MODULE.bazel |
| istio/istio commit | go.mod and ISTIO_SHA in bazel/versions.bzl |
| istio/proxy commit | ISTIO_PROXY_SHA in bazel/versions.bzl |
| Base image | istio_iptables in MODULE.bazel |
The three commits belong together: the istio/istio commit names the istio/proxy commit it was built against, which names the Envoy commit.
bazel/update_istio.sh # latest istio/istio master
ISTIO_SHA=<commit> bazel/update_istio.sh # a given commitThis moves all three commits and the files that follow them: go.mod,
envoy.bazelrc, .bazelversion, ENVOY_VERSION.txt, MODULE.bazel.lock and
bazel/extension_config/istio_extensions_build_config.bzl. The base image
digest is updated by hand when the script says Istio's has moved.
bazel/extension_config/istio_extensions_build_config.bzl is istio/proxy's
file, unchanged. extensions_build_config.bzl next to it adds this
repository's extensions to that set; add or remove one there.