Skip to content
Switch branches/tags
Go to file


Failed to load latest commit information.


Publishing gcp-controller-manager image

This command will build and publish

bazel run //cmd/gcp-controller-manager:publish

Environment variables IMAGE_REGISTRY, IMAGE_REPO and IMAGE_TAG can be used to override destination GCR repository and tag.

This command will build and publish IMAGE_REPO=my-repo IMAGE_TAG=v1 bazel run //cmd/gcp-controller-manager:publish

Dependency management

Dependencies are managed using Go modules (go mod subcommands).

Note that builds are done with Bazel and not the Go tool. Don't follow public Go module docs, instead use instructions in this readme.

Working within GOPATH

If you work within GOPATH, go mod will error out unless you do one of:

  • move repo outside of GOPATH (it should "just work")
  • set env var GO111MODULE=on

Add a new dependency

go get && ./tools/

Update an existing dependency

go get -u && ./tools/

Update all dependencies

go get -u && ./tools/

Note that this most likely won't work due to cross-dependency issues or repos not implementing modules correctly.

Clean up unused dependencies

go mod tidy && ./tools/