kubernetes-sigs/aws-iam-authenticator

aws-iam-authenticator v0.6.0 breaks imports

ripta opened this issue · 2 comments

ripta commented

We use sigs.k8s.io/aws-iam-authenticator/pkg/token to allow some of our dev tooling to use IAM credentials for authentication, which means we import sigs.k8s.io/aws-iam-authenticator as a module.

In past versions, this works well. Unfortunately, the inclusion of k8s.io/kubernetes in the go.mod for aws-iam-authenticator v0.6.0 means it's no longer straight-forward to import, because of all the local path replacements. This inclusion was introduced by #476, which is a great addition in itself.

For example, with v0.5.4, the following works just fine:

❯ mkdir foobar
❯ cd foobar
❯ git init
Initialized empty Git repository in /Users/ripta/projects/foobar/.git/
❯ go mod init github.com/ripta/foobar
go: creating new go.mod: module github.com/ripta/foobar

❯ go get sigs.k8s.io/aws-iam-authenticator@v0.5.4
go: added sigs.k8s.io/aws-iam-authenticator v0.5.4

but in v0.6.0, the go get step fails with:

❯ go get sigs.k8s.io/aws-iam-authenticator@v0.6.0
go: sigs.k8s.io/aws-iam-authenticator@v0.6.0 requires
	k8s.io/kubernetes@v1.22.0 requires
	k8s.io/api@v0.0.0: reading k8s.io/api/go.mod at revision v0.0.0: unknown revision v0.0.0

I'm trying to figure out a long-term solution. Right now, I think we'd be stuck having to replicate the explicit replacements you do in our own go.mod.

I know we're not the only ones that import this repo to get access to pkg/token.

Thanks!

apology for your inconvenience @ripta. we are checking this, will get back to you soon.

Having similar problems, would really appreciate being able to use this module.