-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Dependency FAQ
Istio uses Go modules to manage its dependencies. After enabling modules, use the standard go tooling to import or update a dependency (e.g. go get dependency@version
).
Before you commit, make sure to update the module files: go mod tidy
or make format
Here is an example for updating istio.io/api to the latest:
go get istio.io/api@latest
go mod tidy
Some Istio repositories use Go module support to specify the dependent Istio repository. In this case, the steps in the earlier section can be used to update the dependency.
Example: istio/istio go.mod has the following snippet:
istio.io/api v0.0.0-20200110220949-660e8ea29996
istio.io/gogo-genproto v0.0.0-20191024203824-d079cc8b1d55
istio.io/pkg v0.0.0-20191113122952-4f521de9c8ca
Some Istio repositories use files to point to particular SHA of another repository. In this case, one updates the reference in the file. istio/istio has a script, bin/update_deps.sh, which can be used to update all the dependencies (and in this case, also the common-files) with one command.
The following examples show how istio/istio references proxy which then references the Envoy proxy. Example 1: istio/istio istio.deps contains references to proxy and cni:
{
"_comment": "",
"name": "PROXY_REPO_SHA",
"repoName": "proxy",
"file": "",
"lastStableSHA": "a79985709efab24063beeb19bc17d0271daba967"
},
{
"_comment": "",
"name": "CNI_REPO_SHA",
"repoName": "cni",
"file": "",
"lastStableSHA": "7116840b8a155cc41bb11dd77096f64587c0c773"
}
Example 2: istio/proxy WORKSPACE contains a point to the Envoy proxy
ENVOY_SHA = "456bf9aef22d7b4df4916fa49c5dad2f5dbf0f0f"
ENVOY_SHA256 = "e26750cabcd5d55d4c91a08f63328bdfcacb47eb87ae3c807152b7345a0faf65"
# To override with local envoy, just pass `--override_repository=envoy=/PATH/TO/ENVOY` to Bazel or
# persist the option in `user.bazelrc`.
http_archive(
name = "envoy",
sha256 = ENVOY_SHA256,
strip_prefix = "envoy-wasm-" + ENVOY_SHA,
url = "https://github.com/envoyproxy/envoy-wasm/archive/" + ENVOY_SHA + ".tar.gz",
)
Visit istio.io to learn how to use Istio.
- Preparing for Development Mac
- Preparing for Development Linux
- Troubleshooting Development Environment
- Repository Map
- GitHub Workflow
- Github Gmail Filters
- Using the Code Base
- Developing with Minikube
- Remote Debugging
- Verify your Docker Environment
- Istio Test Framework
- Working with Prow
- Test Grid
- Code Coverage FAQ
- Writing Good Integration Tests
- Test Flakes
- Release Manager Expectations
- Preparing Istio Releases
- 1.5 Release Information
- 1.6 Release Information
- 1.7 Release Information
- 1.8 Release Information
- 1.9 Release Information
- 1.10 Release Information
- 1.11 Release Information
- 1.12 Release Information
- 1.13 Release Information
- 1.14 Release Information
- 1.15 Release Information
- 1.16 Release Information
- 1.17 Release Information
- 1.18 Release Information
- 1.19 Release Information
- 1.20 Release Information
- 1.21 Release Information
- 1.22 Release Information
- 1.23 Release Information
- 1.24 Release Information