mirror of
https://github.com/kubernetes/client-go.git
synced 2026-06-18 15:55:29 +00:00
Compare commits
14 Commits
kubernetes
...
kubernetes
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee6c071a42 | ||
|
|
2d48f18fea | ||
|
|
bcbe227473 | ||
|
|
5633e3a616 | ||
|
|
2705570f5e | ||
|
|
1777665291 | ||
|
|
1b0f6441b0 | ||
|
|
f2f74ab51a | ||
|
|
f0d5882143 | ||
|
|
7c7fe05819 | ||
|
|
65905f29c1 | ||
|
|
52d188ef6c | ||
|
|
b9d8bc3e50 | ||
|
|
cba5305359 |
190
Godeps/Godeps.json
generated
190
Godeps/Godeps.json
generated
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go",
|
||||
"GoVersion": "go1.11",
|
||||
"GodepVersion": "v80",
|
||||
"GodepVersion": "v80-k8s-r1",
|
||||
"Packages": [
|
||||
"./..."
|
||||
],
|
||||
@@ -192,27 +192,27 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/net/context",
|
||||
"Rev": "0ed95abb35c445290478a5348a7b38bb154135fd"
|
||||
"Rev": "b1cc14aba47abf96f96818003fa4caad3a4b4e86"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/net/context/ctxhttp",
|
||||
"Rev": "0ed95abb35c445290478a5348a7b38bb154135fd"
|
||||
"Rev": "b1cc14aba47abf96f96818003fa4caad3a4b4e86"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/net/http/httpguts",
|
||||
"Rev": "b1cc14aba47abf96f96818003fa4caad3a4b4e86"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/net/http2",
|
||||
"Rev": "0ed95abb35c445290478a5348a7b38bb154135fd"
|
||||
"Rev": "b1cc14aba47abf96f96818003fa4caad3a4b4e86"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/net/http2/hpack",
|
||||
"Rev": "0ed95abb35c445290478a5348a7b38bb154135fd"
|
||||
"Rev": "b1cc14aba47abf96f96818003fa4caad3a4b4e86"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/net/idna",
|
||||
"Rev": "0ed95abb35c445290478a5348a7b38bb154135fd"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/net/lex/httplex",
|
||||
"Rev": "0ed95abb35c445290478a5348a7b38bb154135fd"
|
||||
"Rev": "b1cc14aba47abf96f96818003fa4caad3a4b4e86"
|
||||
},
|
||||
{
|
||||
"ImportPath": "golang.org/x/oauth2",
|
||||
@@ -272,339 +272,339 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/admissionregistration/v1alpha1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/admissionregistration/v1beta1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/apps/v1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/apps/v1beta1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/apps/v1beta2",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/auditregistration/v1alpha1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/authentication/v1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/authentication/v1beta1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/authorization/v1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/authorization/v1beta1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/autoscaling/v1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/autoscaling/v2beta1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/autoscaling/v2beta2",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/batch/v1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/batch/v1beta1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/batch/v2alpha1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/certificates/v1beta1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/coordination/v1beta1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/core/v1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/events/v1beta1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/extensions/v1beta1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/imagepolicy/v1alpha1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/networking/v1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/policy/v1beta1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/rbac/v1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/rbac/v1alpha1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/rbac/v1beta1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/scheduling/v1alpha1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/scheduling/v1beta1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/settings/v1alpha1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/storage/v1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/storage/v1alpha1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/storage/v1beta1",
|
||||
"Rev": "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
|
||||
"Rev": "ebce17126a01f5fe02364d88c899816bcc2a8165"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/apitesting",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/fuzzer",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/roundtrip",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/equality",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/errors",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/meta",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1beta1",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/conversion",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/fields",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/labels",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/selection",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/types",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/cache",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/clock",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/diff",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/errors",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/framer",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/json",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/naming",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/net",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/sets",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/validation",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/wait",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/version",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/watch",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
|
||||
"Rev": "86fb29eff6288413d76bd8506874fddd9fccdff0"
|
||||
"Rev": "bf4de9df677cd119930fa83483bad158956cdfcf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/klog",
|
||||
@@ -612,7 +612,7 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/kube-openapi/pkg/util/proto",
|
||||
"Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d"
|
||||
"Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a"
|
||||
},
|
||||
{
|
||||
"ImportPath": "sigs.k8s.io/yaml",
|
||||
|
||||
@@ -164,7 +164,7 @@ func (d *CachedDiscoveryClient) getCachedFile(filename string) ([]byte, error) {
|
||||
}
|
||||
|
||||
func (d *CachedDiscoveryClient) writeCachedFile(filename string, obj runtime.Object) error {
|
||||
if err := os.MkdirAll(filepath.Dir(filename), 0755); err != nil {
|
||||
if err := os.MkdirAll(filepath.Dir(filename), 0750); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ func (d *CachedDiscoveryClient) writeCachedFile(filename string, obj runtime.Obj
|
||||
return err
|
||||
}
|
||||
|
||||
err = os.Chmod(f.Name(), 0755)
|
||||
err = os.Chmod(f.Name(), 0660)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ package discovery
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -95,6 +96,32 @@ func TestNewCachedDiscoveryClient_TTL(t *testing.T) {
|
||||
assert.Equal(c.groupCalls, 2)
|
||||
}
|
||||
|
||||
func TestNewCachedDiscoveryClient_PathPerm(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
d, err := ioutil.TempDir("", "")
|
||||
assert.NoError(err)
|
||||
os.RemoveAll(d)
|
||||
defer os.RemoveAll(d)
|
||||
|
||||
c := fakeDiscoveryClient{}
|
||||
cdc := newCachedDiscoveryClient(&c, d, 1*time.Nanosecond)
|
||||
cdc.ServerGroups()
|
||||
|
||||
err = filepath.Walk(d, func(path string, info os.FileInfo, err error) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if info.IsDir() {
|
||||
assert.Equal(os.FileMode(0750), info.Mode().Perm())
|
||||
} else {
|
||||
assert.Equal(os.FileMode(0660), info.Mode().Perm())
|
||||
}
|
||||
return nil
|
||||
})
|
||||
assert.NoError(err)
|
||||
}
|
||||
|
||||
type fakeDiscoveryClient struct {
|
||||
groupCalls int
|
||||
resourceCalls int
|
||||
|
||||
@@ -18,6 +18,7 @@ package discovery
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/gregjones/httpcache"
|
||||
@@ -35,6 +36,8 @@ type cacheRoundTripper struct {
|
||||
// corresponding requests.
|
||||
func newCacheRoundTripper(cacheDir string, rt http.RoundTripper) http.RoundTripper {
|
||||
d := diskv.New(diskv.Options{
|
||||
PathPerm: os.FileMode(0750),
|
||||
FilePerm: os.FileMode(0660),
|
||||
BasePath: cacheDir,
|
||||
TempDir: filepath.Join(cacheDir, ".diskv-temp"),
|
||||
})
|
||||
|
||||
@@ -22,7 +22,10 @@ import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
// copied from k8s.io/client-go/transport/round_trippers_test.go
|
||||
@@ -93,3 +96,52 @@ func TestCacheRoundTripper(t *testing.T) {
|
||||
t.Errorf("Invalid content read from cache %q", string(content))
|
||||
}
|
||||
}
|
||||
|
||||
func TestCacheRoundTripperPathPerm(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
rt := &testRoundTripper{}
|
||||
cacheDir, err := ioutil.TempDir("", "cache-rt")
|
||||
os.RemoveAll(cacheDir)
|
||||
defer os.RemoveAll(cacheDir)
|
||||
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
cache := newCacheRoundTripper(cacheDir, rt)
|
||||
|
||||
// First call, caches the response
|
||||
req := &http.Request{
|
||||
Method: http.MethodGet,
|
||||
URL: &url.URL{Host: "localhost"},
|
||||
}
|
||||
rt.Response = &http.Response{
|
||||
Header: http.Header{"ETag": []string{`"123456"`}},
|
||||
Body: ioutil.NopCloser(bytes.NewReader([]byte("Content"))),
|
||||
StatusCode: http.StatusOK,
|
||||
}
|
||||
resp, err := cache.RoundTrip(req)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
content, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if string(content) != "Content" {
|
||||
t.Errorf(`Expected Body to be "Content", got %q`, string(content))
|
||||
}
|
||||
|
||||
err = filepath.Walk(cacheDir, func(path string, info os.FileInfo, err error) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if info.IsDir() {
|
||||
assert.Equal(os.FileMode(0750), info.Mode().Perm())
|
||||
} else {
|
||||
assert.Equal(os.FileMode(0660), info.Mode().Perm())
|
||||
}
|
||||
return nil
|
||||
})
|
||||
assert.NoError(err)
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package dynamic
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"k8s.io/apimachinery/pkg/api/meta"
|
||||
@@ -94,6 +95,9 @@ func (c *dynamicResourceClient) Create(obj *unstructured.Unstructured, opts meta
|
||||
return nil, err
|
||||
}
|
||||
name = accessor.GetName()
|
||||
if len(name) == 0 {
|
||||
return nil, fmt.Errorf("name is required")
|
||||
}
|
||||
}
|
||||
|
||||
result := c.client.client.
|
||||
@@ -122,6 +126,10 @@ func (c *dynamicResourceClient) Update(obj *unstructured.Unstructured, opts meta
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := accessor.GetName()
|
||||
if len(name) == 0 {
|
||||
return nil, fmt.Errorf("name is required")
|
||||
}
|
||||
outBytes, err := runtime.Encode(unstructured.UnstructuredJSONScheme, obj)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -129,7 +137,7 @@ func (c *dynamicResourceClient) Update(obj *unstructured.Unstructured, opts meta
|
||||
|
||||
result := c.client.client.
|
||||
Put().
|
||||
AbsPath(append(c.makeURLSegments(accessor.GetName()), subresources...)...).
|
||||
AbsPath(append(c.makeURLSegments(name), subresources...)...).
|
||||
Body(outBytes).
|
||||
SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).
|
||||
Do()
|
||||
@@ -153,6 +161,10 @@ func (c *dynamicResourceClient) UpdateStatus(obj *unstructured.Unstructured, opt
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := accessor.GetName()
|
||||
if len(name) == 0 {
|
||||
return nil, fmt.Errorf("name is required")
|
||||
}
|
||||
|
||||
outBytes, err := runtime.Encode(unstructured.UnstructuredJSONScheme, obj)
|
||||
if err != nil {
|
||||
@@ -161,7 +173,7 @@ func (c *dynamicResourceClient) UpdateStatus(obj *unstructured.Unstructured, opt
|
||||
|
||||
result := c.client.client.
|
||||
Put().
|
||||
AbsPath(append(c.makeURLSegments(accessor.GetName()), "status")...).
|
||||
AbsPath(append(c.makeURLSegments(name), "status")...).
|
||||
Body(outBytes).
|
||||
SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).
|
||||
Do()
|
||||
@@ -181,6 +193,9 @@ func (c *dynamicResourceClient) UpdateStatus(obj *unstructured.Unstructured, opt
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) Delete(name string, opts *metav1.DeleteOptions, subresources ...string) error {
|
||||
if len(name) == 0 {
|
||||
return fmt.Errorf("name is required")
|
||||
}
|
||||
if opts == nil {
|
||||
opts = &metav1.DeleteOptions{}
|
||||
}
|
||||
@@ -216,6 +231,9 @@ func (c *dynamicResourceClient) DeleteCollection(opts *metav1.DeleteOptions, lis
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) Get(name string, opts metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
if len(name) == 0 {
|
||||
return nil, fmt.Errorf("name is required")
|
||||
}
|
||||
result := c.client.client.Get().AbsPath(append(c.makeURLSegments(name), subresources...)...).SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).Do()
|
||||
if err := result.Error(); err != nil {
|
||||
return nil, err
|
||||
@@ -284,6 +302,9 @@ func (c *dynamicResourceClient) Watch(opts metav1.ListOptions) (watch.Interface,
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) Patch(name string, pt types.PatchType, data []byte, opts metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) {
|
||||
if len(name) == 0 {
|
||||
return nil, fmt.Errorf("name is required")
|
||||
}
|
||||
result := c.client.client.
|
||||
Patch(pt).
|
||||
AbsPath(append(c.makeURLSegments(name), subresources...)...).
|
||||
|
||||
@@ -145,6 +145,7 @@ func (r *azureRoundTripper) WrappedRoundTripper() http.RoundTripper { return r.r
|
||||
|
||||
type azureToken struct {
|
||||
token adal.Token
|
||||
environment string
|
||||
clientID string
|
||||
tenantID string
|
||||
apiserverID string
|
||||
@@ -219,6 +220,10 @@ func (ts *azureTokenSource) retrieveTokenFromCfg() (*azureToken, error) {
|
||||
if refreshToken == "" {
|
||||
return nil, fmt.Errorf("no refresh token in cfg: %s", cfgRefreshToken)
|
||||
}
|
||||
environment := ts.cfg[cfgEnvironment]
|
||||
if environment == "" {
|
||||
return nil, fmt.Errorf("no environment in cfg: %s", cfgEnvironment)
|
||||
}
|
||||
clientID := ts.cfg[cfgClientID]
|
||||
if clientID == "" {
|
||||
return nil, fmt.Errorf("no client ID in cfg: %s", cfgClientID)
|
||||
@@ -250,6 +255,7 @@ func (ts *azureTokenSource) retrieveTokenFromCfg() (*azureToken, error) {
|
||||
Resource: fmt.Sprintf("spn:%s", apiserverID),
|
||||
Type: tokenType,
|
||||
},
|
||||
environment: environment,
|
||||
clientID: clientID,
|
||||
tenantID: tenantID,
|
||||
apiserverID: apiserverID,
|
||||
@@ -260,6 +266,7 @@ func (ts *azureTokenSource) storeTokenInCfg(token *azureToken) error {
|
||||
newCfg := make(map[string]string)
|
||||
newCfg[cfgAccessToken] = token.token.AccessToken
|
||||
newCfg[cfgRefreshToken] = token.token.RefreshToken
|
||||
newCfg[cfgEnvironment] = token.environment
|
||||
newCfg[cfgClientID] = token.clientID
|
||||
newCfg[cfgTenantID] = token.tenantID
|
||||
newCfg[cfgApiserverID] = token.apiserverID
|
||||
@@ -275,7 +282,12 @@ func (ts *azureTokenSource) storeTokenInCfg(token *azureToken) error {
|
||||
}
|
||||
|
||||
func (ts *azureTokenSource) refreshToken(token *azureToken) (*azureToken, error) {
|
||||
oauthConfig, err := adal.NewOAuthConfig(azure.PublicCloud.ActiveDirectoryEndpoint, token.tenantID)
|
||||
env, err := azure.EnvironmentFromName(token.environment)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
oauthConfig, err := adal.NewOAuthConfig(env.ActiveDirectoryEndpoint, token.tenantID)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("building the OAuth configuration for token refresh: %v", err)
|
||||
}
|
||||
@@ -299,6 +311,7 @@ func (ts *azureTokenSource) refreshToken(token *azureToken) (*azureToken, error)
|
||||
|
||||
return &azureToken{
|
||||
token: spt.Token(),
|
||||
environment: token.environment,
|
||||
clientID: token.clientID,
|
||||
tenantID: token.tenantID,
|
||||
apiserverID: token.apiserverID,
|
||||
@@ -353,6 +366,7 @@ func (ts *azureTokenSourceDeviceCode) Token() (*azureToken, error) {
|
||||
|
||||
return &azureToken{
|
||||
token: *token,
|
||||
environment: ts.environment.Name,
|
||||
clientID: ts.clientID,
|
||||
tenantID: ts.tenantID,
|
||||
apiserverID: ts.apiserverID,
|
||||
|
||||
@@ -53,6 +53,13 @@ func TestAzureTokenSource(t *testing.T) {
|
||||
|
||||
wantCfg := token2Cfg(token)
|
||||
persistedCfg := persiter.Cache()
|
||||
|
||||
wantCfgLen := len(wantCfg)
|
||||
persistedCfgLen := len(persistedCfg)
|
||||
if wantCfgLen != persistedCfgLen {
|
||||
t.Errorf("wantCfgLen and persistedCfgLen do not match, wantCfgLen=%v, persistedCfgLen=%v", wantCfgLen, persistedCfgLen)
|
||||
}
|
||||
|
||||
for k, v := range persistedCfg {
|
||||
if strings.Compare(v, wantCfg[k]) != 0 {
|
||||
t.Errorf("Token() persisted cfg %s: got %v, want %v", k, v, wantCfg[k])
|
||||
@@ -103,6 +110,7 @@ type fakeTokenSource struct {
|
||||
func (ts *fakeTokenSource) Token() (*azureToken, error) {
|
||||
return &azureToken{
|
||||
token: newFackeAzureToken(ts.accessToken, ts.expiresOn),
|
||||
environment: "testenv",
|
||||
clientID: "fake",
|
||||
tenantID: "fake",
|
||||
apiserverID: "fake",
|
||||
@@ -113,6 +121,7 @@ func token2Cfg(token *azureToken) map[string]string {
|
||||
cfg := make(map[string]string)
|
||||
cfg[cfgAccessToken] = token.token.AccessToken
|
||||
cfg[cfgRefreshToken] = token.token.RefreshToken
|
||||
cfg[cfgEnvironment] = token.environment
|
||||
cfg[cfgClientID] = token.clientID
|
||||
cfg[cfgTenantID] = token.tenantID
|
||||
cfg[cfgApiserverID] = token.apiserverID
|
||||
|
||||
@@ -74,9 +74,10 @@ func (c *Config) TransportConfig() (*transport.Config, error) {
|
||||
KeyFile: c.KeyFile,
|
||||
KeyData: c.KeyData,
|
||||
},
|
||||
Username: c.Username,
|
||||
Password: c.Password,
|
||||
BearerToken: c.BearerToken,
|
||||
Username: c.Username,
|
||||
Password: c.Password,
|
||||
BearerToken: c.BearerToken,
|
||||
BearerTokenFile: c.BearerTokenFile,
|
||||
Impersonate: transport.ImpersonationConfig{
|
||||
UserName: c.Impersonate.UserName,
|
||||
Groups: c.Impersonate.Groups,
|
||||
|
||||
@@ -228,6 +228,7 @@ func (config *DirectClientConfig) getUserIdentificationPartialConfig(configAuthI
|
||||
// blindly overwrite existing values based on precedence
|
||||
if len(configAuthInfo.Token) > 0 {
|
||||
mergedConfig.BearerToken = configAuthInfo.Token
|
||||
mergedConfig.BearerTokenFile = configAuthInfo.TokenFile
|
||||
} else if len(configAuthInfo.TokenFile) > 0 {
|
||||
tokenBytes, err := ioutil.ReadFile(configAuthInfo.TokenFile)
|
||||
if err != nil {
|
||||
@@ -499,8 +500,9 @@ func (config *inClusterClientConfig) ClientConfig() (*restclient.Config, error)
|
||||
if server := config.overrides.ClusterInfo.Server; len(server) > 0 {
|
||||
icc.Host = server
|
||||
}
|
||||
if token := config.overrides.AuthInfo.Token; len(token) > 0 {
|
||||
icc.BearerToken = token
|
||||
if len(config.overrides.AuthInfo.Token) > 0 || len(config.overrides.AuthInfo.TokenFile) > 0 {
|
||||
icc.BearerToken = config.overrides.AuthInfo.Token
|
||||
icc.BearerTokenFile = config.overrides.AuthInfo.TokenFile
|
||||
}
|
||||
if certificateAuthorityFile := config.overrides.ClusterInfo.CertificateAuthority; len(certificateAuthorityFile) > 0 {
|
||||
icc.TLSClientConfig.CAFile = certificateAuthorityFile
|
||||
|
||||
@@ -548,6 +548,30 @@ func TestInClusterClientConfigPrecedence(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
overrides: &ConfigOverrides{
|
||||
ClusterInfo: clientcmdapi.Cluster{
|
||||
Server: "https://host-from-overrides.com",
|
||||
CertificateAuthority: "/path/to/ca-from-overrides.crt",
|
||||
},
|
||||
AuthInfo: clientcmdapi.AuthInfo{
|
||||
Token: "token-from-override",
|
||||
TokenFile: "tokenfile-from-override",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
overrides: &ConfigOverrides{
|
||||
ClusterInfo: clientcmdapi.Cluster{
|
||||
Server: "https://host-from-overrides.com",
|
||||
CertificateAuthority: "/path/to/ca-from-overrides.crt",
|
||||
},
|
||||
AuthInfo: clientcmdapi.AuthInfo{
|
||||
Token: "",
|
||||
TokenFile: "tokenfile-from-override",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
overrides: &ConfigOverrides{},
|
||||
},
|
||||
@@ -556,13 +580,15 @@ func TestInClusterClientConfigPrecedence(t *testing.T) {
|
||||
for _, tc := range tt {
|
||||
expectedServer := "https://host-from-cluster.com"
|
||||
expectedToken := "token-from-cluster"
|
||||
expectedTokenFile := "tokenfile-from-cluster"
|
||||
expectedCAFile := "/path/to/ca-from-cluster.crt"
|
||||
|
||||
icc := &inClusterClientConfig{
|
||||
inClusterConfigProvider: func() (*restclient.Config, error) {
|
||||
return &restclient.Config{
|
||||
Host: expectedServer,
|
||||
BearerToken: expectedToken,
|
||||
Host: expectedServer,
|
||||
BearerToken: expectedToken,
|
||||
BearerTokenFile: expectedTokenFile,
|
||||
TLSClientConfig: restclient.TLSClientConfig{
|
||||
CAFile: expectedCAFile,
|
||||
},
|
||||
@@ -579,8 +605,9 @@ func TestInClusterClientConfigPrecedence(t *testing.T) {
|
||||
if overridenServer := tc.overrides.ClusterInfo.Server; len(overridenServer) > 0 {
|
||||
expectedServer = overridenServer
|
||||
}
|
||||
if overridenToken := tc.overrides.AuthInfo.Token; len(overridenToken) > 0 {
|
||||
expectedToken = overridenToken
|
||||
if len(tc.overrides.AuthInfo.Token) > 0 || len(tc.overrides.AuthInfo.TokenFile) > 0 {
|
||||
expectedToken = tc.overrides.AuthInfo.Token
|
||||
expectedTokenFile = tc.overrides.AuthInfo.TokenFile
|
||||
}
|
||||
if overridenCAFile := tc.overrides.ClusterInfo.CertificateAuthority; len(overridenCAFile) > 0 {
|
||||
expectedCAFile = overridenCAFile
|
||||
@@ -592,6 +619,9 @@ func TestInClusterClientConfigPrecedence(t *testing.T) {
|
||||
if clientConfig.BearerToken != expectedToken {
|
||||
t.Errorf("Expected token %v, got %v", expectedToken, clientConfig.BearerToken)
|
||||
}
|
||||
if clientConfig.BearerTokenFile != expectedTokenFile {
|
||||
t.Errorf("Expected tokenfile %v, got %v", expectedTokenFile, clientConfig.BearerTokenFile)
|
||||
}
|
||||
if clientConfig.TLSClientConfig.CAFile != expectedCAFile {
|
||||
t.Errorf("Expected Certificate Authority %v, got %v", expectedCAFile, clientConfig.TLSClientConfig.CAFile)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user