Right now libk8s just makes dealing with crazy dependency list of
k8s.io/client-go
a little bit easier. Maybe in the future
github.com/datawire/teleproxy/pkg/k8s
will migrate to here.
- Stick
_ "github.com/datawire/libk8s"
in theimports ()
section of one of your.go
files. - Run
go run github.com/datawire/libk8s/cmd/fix-go.mod
to downgrade anything thatk8s.io/client-go
wants to use an older version of. - Run
go mod tidy
to bring everything back in to alignment.
- Run
go mod edit -require=github.com/datawire/libk8s@THE_VERSION_THAT_YOU_WANT
- Run
go run github.com/datawire/libk8s/cmd/fix-go.mod
- Run
go mod tidy
Most of libk8s is generated from k8s.io/client-go
's Godep files by
the go run ./cmd/generate-libk8s
script (which is called by make
,
for convenience). The only "actual" files to edit are:
Makefile
cmd/generate-libk8s/*.go
cmd/fix-go.mod/main.go
README.md
.gitignore
I advise that you use Go 1.13 when running make
. It does a better
job of resolving commit hashes to tags than 1.12.9 does.