Skip to content

Commit

Permalink
Add support for oidc auth on Kubernetes
Browse files Browse the repository at this point in the history
Symptoms:
```
kubectl trace run $NODE_NAME -e "tracepoint:syscalls:sys_enter_* { @[probe] = count(); }"
Error: No Auth Provider found for name "oidc"
```

The client/auth/oidc pkg in client-go is not vendored. This patch adds
the blank import and I let 'make' update go.mod and go.sum.

However, I still have errors (with go1.11.4):
```
go: finding github.com/emicklei/go-restful/log latest
../../go/pkg/mod/github.com/emicklei/[email protected]+incompatible/container.go:17:2: unknown import path "github.com/emicklei/go-restful/log": cannot find module providing package github.com/emicklei/go-restful/log
make: *** [Makefile:30: _output/bin/kubectl-trace] Error 1
```

Signed-off-by: Alban Crequy <[email protected]>
  • Loading branch information
alban committed Jan 11, 2019
1 parent 829327f commit cce429d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions cmd/kubectl-trace/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/spf13/pflag"
"k8s.io/cli-runtime/pkg/genericclioptions"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
_ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ require (
gotest.tools v2.2.0+incompatible
k8s.io/api v0.0.0-20181221193117-173ce66c1e39
k8s.io/apiextensions-apiserver v0.0.0-20190103235604-e7617803aceb // indirect
k8s.io/apimachinery v0.0.0-20190104073114-849b284f3b75
k8s.io/apimachinery v0.0.0-20190109170643-c3a4c8673eae
k8s.io/apiserver v0.0.0-20190105074621-3b195c470123 // indirect
k8s.io/cli-runtime v0.0.0-20181221202950-8abb1aeb8307
k8s.io/client-go v10.0.0+incompatible
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ k8s.io/apiextensions-apiserver v0.0.0-20190103235604-e7617803aceb h1:3yElwSbnV34
k8s.io/apiextensions-apiserver v0.0.0-20190103235604-e7617803aceb/go.mod h1:IxkesAMoaCRoLrPJdZNZUQp9NfZnzqaVzLhb2VEQzXE=
k8s.io/apimachinery v0.0.0-20190104073114-849b284f3b75 h1:dLhsGWh58R0WYgTCX6ZdaqSz2FltMZsk+ByHsUgMWRU=
k8s.io/apimachinery v0.0.0-20190104073114-849b284f3b75/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0=
k8s.io/apimachinery v0.0.0-20190109170643-c3a4c8673eae h1:IY81s2qqexqkVqtTf2LHAEuKE4rBlcJUvUrxsZJYGCY=
k8s.io/apimachinery v0.0.0-20190109170643-c3a4c8673eae/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0=
k8s.io/apiserver v0.0.0-20190105074621-3b195c470123 h1:mRxzFwfdFD1THYxnq5UFJnWm3Hf16Jrjr5lBm9Rc1eg=
k8s.io/apiserver v0.0.0-20190105074621-3b195c470123/go.mod h1:6bqaTSOSJavUIXUtfaR9Os9JtTCm8ZqH2SUl2S60C4w=
k8s.io/cli-runtime v0.0.0-20181221202950-8abb1aeb8307 h1:x8ssI66Rojl2Q5vd9CvgZkwJBWiauDioKu8F3V9nBas=
Expand Down

0 comments on commit cce429d

Please sign in to comment.