Compare commits

...

12 Commits

Author SHA1 Message Date
Kubernetes Publisher
1f13a808da Merge pull request #66683 from awly/automated-cherry-pick-of-#66395-upstream-release-1.11
Automatic merge from submit-queue.

Automated cherry pick of #66395: Set connrotation dialer via restclient.Config.Dialer

Cherry pick of #66395 on release-1.11.

#66395: Set connrotation dialer via restclient.Config.Dialer

Kubernetes-commit: 77555257773c21d18a2eafa3c532b28973970d3b
2018-08-06 13:40:42 +00:00
Andrew Lytvynov
401c87eddd Set connrotation dialer via restclient.Config.Dialer
Instead of Transport. This fixes ExecPlugin, which fails if
restclient.Config.Transport is set.

Kubernetes-commit: 89322ec5deb057483b3c91816aac48fe7044ecd8
2018-07-25 16:22:32 -07:00
Kubernetes Publisher
e5bc2a7bbb Merge pull request #65283 from liggitt/automated-cherry-pick-of-#65256-upstream-release-1.11
Automatic merge from submit-queue.

Automated cherry pick of #65256: bump(k8s.io/kube-openapi):

Fixes #65243

Cherry pick of #65256 on release-1.11.

#65256: bump(k8s.io/kube-openapi):

```release-note
fixed incorrect OpenAPI schema for CustomResourceDefinition objects
```

Kubernetes-commit: 5f5d6aa92b27bc300c631fd3fe26edc0f55fbb06
2018-06-21 07:31:03 +00:00
Jordan Liggitt
5c54f12e94 bump(k8s.io/kube-openapi): 91cfa479c814065e420cee7ed227db0f63a5854e
Kubernetes-commit: 7936a5bb822845c2a38d6f7da79bf3225e8faf1c
2018-06-19 23:23:00 -04:00
Kubernetes Publisher
11bffe824e Merge remote-tracking branch 'origin/master' into release-1.11
Kubernetes-commit: 61de6239b735f2d22a905247ca281bd6a4229989
2018-06-15 12:20:43 -04:00
Kubernetes Publisher
8560813064 Merge pull request #65034 from caesarxuchao/json-case-sensitive
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Make kubernetes json serializer case sensitive

This PR imported the latest jsoniterator library so that case sensitivity during unmarhsaling is optional. The PR also set Kubernetes json serializer to be case sensitive.

Kubernetes json serializer had been case sensitive for 1.1-1.7 as we were using ugorji. This PR restores the behavior.

Fix #64612.

```release-notes
Kubernetes json deserializer is now case-sensitive as it was before 1.8.
If your config files contains fields with wrong case, the config files will be now invalid.
```

Kubernetes-commit: a2de1398f829ef38d645579160bdd6bfec8384d3
2018-06-15 19:30:00 +00:00
Kubernetes Publisher
2d1fce8ff8 Merge remote-tracking branch 'origin/master' into release-1.11
Kubernetes-commit: 465c3d5995501b90a608088e647e91f992896636
2018-06-14 15:30:10 +00:00
Andrew Lytvynov
ab6fed13f4 Re-use private key after failed CSR
If we create a new key on each CSR, if CSR fails the next attempt will
create a new one instead of reusing previous CSR.

If approver/signer don't handle CSRs as quickly as new nodes come up,
they can pile up and approver would keep handling old abandoned CSRs and
Nodes would keep timing out on startup.

Kubernetes-commit: 2c0f043957d25da162fe4e1026c50e2587529ff9
2018-06-13 11:27:25 -07:00
Kubernetes Publisher
cd89475a09 sync: update godeps 2018-06-11 19:28:49 +00:00
Chao Xu
0bb1a137a4 vendor the latest json-iterator
Kubernetes-commit: dd69be30a5f296102be6b9706e6ad0c5db8e2c0f
2018-06-10 16:48:43 -07:00
Kubernetes Publisher
94da772526 Merge remote-tracking branch 'origin/master' into release-1.11
Kubernetes-commit: d2d36588b7bf9819e7d6924d668ba217052e17cb
2018-06-08 15:32:04 +00:00
Jordan Liggitt
90da597c77 Revert "Auto-generated code for the Vertical Pod Autoscaler API."
This reverts commit da65f30e2aca4ca8177fcf27e95909e2883b6e20.

Kubernetes-commit: 846cbe4e6b63b198bd9926e59900f750168e6c69
2018-06-07 14:12:22 -04:00
13 changed files with 97 additions and 622 deletions

164
Godeps/Godeps.json generated
View File

@@ -156,7 +156,7 @@
},
{
"ImportPath": "github.com/json-iterator/go",
"Rev": "2ddf6d758266fcb080a4f9e054b9f292c85e6798"
"Rev": "f2b4162afba35581b6d4a50d3b8f34e33c144682"
},
{
"ImportPath": "github.com/modern-go/concurrent",
@@ -268,327 +268,327 @@
},
{
"ImportPath": "k8s.io/api/admissionregistration/v1alpha1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/admissionregistration/v1beta1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/apps/v1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/apps/v1beta1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/apps/v1beta2",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/authentication/v1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/authentication/v1beta1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/authorization/v1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/authorization/v1beta1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/autoscaling/v1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/autoscaling/v2beta1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/batch/v1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/batch/v1beta1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/batch/v2alpha1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/certificates/v1beta1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/core/v1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/events/v1beta1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/extensions/v1beta1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/imagepolicy/v1alpha1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/networking/v1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/policy/v1beta1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/rbac/v1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/rbac/v1alpha1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/rbac/v1beta1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/scheduling/v1alpha1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/scheduling/v1beta1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/settings/v1alpha1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/storage/v1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/storage/v1alpha1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/api/storage/v1beta1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "2d6f90ab1293a1fb871cf149423ebb72aa7423aa"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/equality",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/errors",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/meta",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/testing",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/fuzzer",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/roundtrip",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1beta1",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/conversion",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/fields",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/labels",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/selection",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/types",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/cache",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/clock",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/diff",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/errors",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/framer",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/json",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/net",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/sets",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/validation",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/wait",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/version",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/watch",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
"Rev": "8c14244ab7eeffb1e4acd1ac1afb315b30fe67bf"
"Rev": "103fd098999dc9c0c88536f5c9ad2e5da39373ae"
},
{
"ImportPath": "k8s.io/kube-openapi/pkg/util/proto",
"Rev": "8a9b82f00b3a86eac24681da3f9fe6c34c01cea2"
"Rev": "91cfa479c814065e420cee7ed227db0f63a5854e"
}
]
}

View File

@@ -26,8 +26,6 @@ import (
type Interface interface {
// HorizontalPodAutoscalers returns a HorizontalPodAutoscalerInformer.
HorizontalPodAutoscalers() HorizontalPodAutoscalerInformer
// VerticalPodAutoscalers returns a VerticalPodAutoscalerInformer.
VerticalPodAutoscalers() VerticalPodAutoscalerInformer
}
type version struct {
@@ -45,8 +43,3 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
func (v *version) HorizontalPodAutoscalers() HorizontalPodAutoscalerInformer {
return &horizontalPodAutoscalerInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
// VerticalPodAutoscalers returns a VerticalPodAutoscalerInformer.
func (v *version) VerticalPodAutoscalers() VerticalPodAutoscalerInformer {
return &verticalPodAutoscalerInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}

View File

@@ -1,89 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by informer-gen. DO NOT EDIT.
package v2beta1
import (
time "time"
autoscaling_v2beta1 "k8s.io/api/autoscaling/v2beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
kubernetes "k8s.io/client-go/kubernetes"
v2beta1 "k8s.io/client-go/listers/autoscaling/v2beta1"
cache "k8s.io/client-go/tools/cache"
)
// VerticalPodAutoscalerInformer provides access to a shared informer and lister for
// VerticalPodAutoscalers.
type VerticalPodAutoscalerInformer interface {
Informer() cache.SharedIndexInformer
Lister() v2beta1.VerticalPodAutoscalerLister
}
type verticalPodAutoscalerInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewVerticalPodAutoscalerInformer constructs a new informer for VerticalPodAutoscaler type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewVerticalPodAutoscalerInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredVerticalPodAutoscalerInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredVerticalPodAutoscalerInformer constructs a new informer for VerticalPodAutoscaler type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredVerticalPodAutoscalerInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.AutoscalingV2beta1().VerticalPodAutoscalers(namespace).List(options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.AutoscalingV2beta1().VerticalPodAutoscalers(namespace).Watch(options)
},
},
&autoscaling_v2beta1.VerticalPodAutoscaler{},
resyncPeriod,
indexers,
)
}
func (f *verticalPodAutoscalerInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredVerticalPodAutoscalerInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *verticalPodAutoscalerInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&autoscaling_v2beta1.VerticalPodAutoscaler{}, f.defaultInformer)
}
func (f *verticalPodAutoscalerInformer) Lister() v2beta1.VerticalPodAutoscalerLister {
return v2beta1.NewVerticalPodAutoscalerLister(f.Informer().GetIndexer())
}

View File

@@ -125,8 +125,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
// Group=autoscaling, Version=v2beta1
case v2beta1.SchemeGroupVersion.WithResource("horizontalpodautoscalers"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Autoscaling().V2beta1().HorizontalPodAutoscalers().Informer()}, nil
case v2beta1.SchemeGroupVersion.WithResource("verticalpodautoscalers"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Autoscaling().V2beta1().VerticalPodAutoscalers().Informer()}, nil
// Group=batch, Version=v1
case batch_v1.SchemeGroupVersion.WithResource("jobs"):

View File

@@ -28,7 +28,6 @@ import (
type AutoscalingV2beta1Interface interface {
RESTClient() rest.Interface
HorizontalPodAutoscalersGetter
VerticalPodAutoscalersGetter
}
// AutoscalingV2beta1Client is used to interact with features provided by the autoscaling group.
@@ -40,10 +39,6 @@ func (c *AutoscalingV2beta1Client) HorizontalPodAutoscalers(namespace string) Ho
return newHorizontalPodAutoscalers(c, namespace)
}
func (c *AutoscalingV2beta1Client) VerticalPodAutoscalers(namespace string) VerticalPodAutoscalerInterface {
return newVerticalPodAutoscalers(c, namespace)
}
// NewForConfig creates a new AutoscalingV2beta1Client for the given config.
func NewForConfig(c *rest.Config) (*AutoscalingV2beta1Client, error) {
config := *c

View File

@@ -32,10 +32,6 @@ func (c *FakeAutoscalingV2beta1) HorizontalPodAutoscalers(namespace string) v2be
return &FakeHorizontalPodAutoscalers{c, namespace}
}
func (c *FakeAutoscalingV2beta1) VerticalPodAutoscalers(namespace string) v2beta1.VerticalPodAutoscalerInterface {
return &FakeVerticalPodAutoscalers{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeAutoscalingV2beta1) RESTClient() rest.Interface {

View File

@@ -1,140 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v2beta1 "k8s.io/api/autoscaling/v2beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeVerticalPodAutoscalers implements VerticalPodAutoscalerInterface
type FakeVerticalPodAutoscalers struct {
Fake *FakeAutoscalingV2beta1
ns string
}
var verticalpodautoscalersResource = schema.GroupVersionResource{Group: "autoscaling", Version: "v2beta1", Resource: "verticalpodautoscalers"}
var verticalpodautoscalersKind = schema.GroupVersionKind{Group: "autoscaling", Version: "v2beta1", Kind: "VerticalPodAutoscaler"}
// Get takes name of the verticalPodAutoscaler, and returns the corresponding verticalPodAutoscaler object, and an error if there is any.
func (c *FakeVerticalPodAutoscalers) Get(name string, options v1.GetOptions) (result *v2beta1.VerticalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(verticalpodautoscalersResource, c.ns, name), &v2beta1.VerticalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*v2beta1.VerticalPodAutoscaler), err
}
// List takes label and field selectors, and returns the list of VerticalPodAutoscalers that match those selectors.
func (c *FakeVerticalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta1.VerticalPodAutoscalerList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(verticalpodautoscalersResource, verticalpodautoscalersKind, c.ns, opts), &v2beta1.VerticalPodAutoscalerList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v2beta1.VerticalPodAutoscalerList{ListMeta: obj.(*v2beta1.VerticalPodAutoscalerList).ListMeta}
for _, item := range obj.(*v2beta1.VerticalPodAutoscalerList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested verticalPodAutoscalers.
func (c *FakeVerticalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(verticalpodautoscalersResource, c.ns, opts))
}
// Create takes the representation of a verticalPodAutoscaler and creates it. Returns the server's representation of the verticalPodAutoscaler, and an error, if there is any.
func (c *FakeVerticalPodAutoscalers) Create(verticalPodAutoscaler *v2beta1.VerticalPodAutoscaler) (result *v2beta1.VerticalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(verticalpodautoscalersResource, c.ns, verticalPodAutoscaler), &v2beta1.VerticalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*v2beta1.VerticalPodAutoscaler), err
}
// Update takes the representation of a verticalPodAutoscaler and updates it. Returns the server's representation of the verticalPodAutoscaler, and an error, if there is any.
func (c *FakeVerticalPodAutoscalers) Update(verticalPodAutoscaler *v2beta1.VerticalPodAutoscaler) (result *v2beta1.VerticalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(verticalpodautoscalersResource, c.ns, verticalPodAutoscaler), &v2beta1.VerticalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*v2beta1.VerticalPodAutoscaler), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeVerticalPodAutoscalers) UpdateStatus(verticalPodAutoscaler *v2beta1.VerticalPodAutoscaler) (*v2beta1.VerticalPodAutoscaler, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(verticalpodautoscalersResource, "status", c.ns, verticalPodAutoscaler), &v2beta1.VerticalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*v2beta1.VerticalPodAutoscaler), err
}
// Delete takes name of the verticalPodAutoscaler and deletes it. Returns an error if one occurs.
func (c *FakeVerticalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(verticalpodautoscalersResource, c.ns, name), &v2beta1.VerticalPodAutoscaler{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeVerticalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(verticalpodautoscalersResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v2beta1.VerticalPodAutoscalerList{})
return err
}
// Patch applies the patch and returns the patched verticalPodAutoscaler.
func (c *FakeVerticalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta1.VerticalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(verticalpodautoscalersResource, c.ns, name, data, subresources...), &v2beta1.VerticalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*v2beta1.VerticalPodAutoscaler), err
}

View File

@@ -19,5 +19,3 @@ limitations under the License.
package v2beta1
type HorizontalPodAutoscalerExpansion interface{}
type VerticalPodAutoscalerExpansion interface{}

View File

@@ -1,174 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v2beta1
import (
v2beta1 "k8s.io/api/autoscaling/v2beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest"
)
// VerticalPodAutoscalersGetter has a method to return a VerticalPodAutoscalerInterface.
// A group's client should implement this interface.
type VerticalPodAutoscalersGetter interface {
VerticalPodAutoscalers(namespace string) VerticalPodAutoscalerInterface
}
// VerticalPodAutoscalerInterface has methods to work with VerticalPodAutoscaler resources.
type VerticalPodAutoscalerInterface interface {
Create(*v2beta1.VerticalPodAutoscaler) (*v2beta1.VerticalPodAutoscaler, error)
Update(*v2beta1.VerticalPodAutoscaler) (*v2beta1.VerticalPodAutoscaler, error)
UpdateStatus(*v2beta1.VerticalPodAutoscaler) (*v2beta1.VerticalPodAutoscaler, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v2beta1.VerticalPodAutoscaler, error)
List(opts v1.ListOptions) (*v2beta1.VerticalPodAutoscalerList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta1.VerticalPodAutoscaler, err error)
VerticalPodAutoscalerExpansion
}
// verticalPodAutoscalers implements VerticalPodAutoscalerInterface
type verticalPodAutoscalers struct {
client rest.Interface
ns string
}
// newVerticalPodAutoscalers returns a VerticalPodAutoscalers
func newVerticalPodAutoscalers(c *AutoscalingV2beta1Client, namespace string) *verticalPodAutoscalers {
return &verticalPodAutoscalers{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the verticalPodAutoscaler, and returns the corresponding verticalPodAutoscaler object, and an error if there is any.
func (c *verticalPodAutoscalers) Get(name string, options v1.GetOptions) (result *v2beta1.VerticalPodAutoscaler, err error) {
result = &v2beta1.VerticalPodAutoscaler{}
err = c.client.Get().
Namespace(c.ns).
Resource("verticalpodautoscalers").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of VerticalPodAutoscalers that match those selectors.
func (c *verticalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta1.VerticalPodAutoscalerList, err error) {
result = &v2beta1.VerticalPodAutoscalerList{}
err = c.client.Get().
Namespace(c.ns).
Resource("verticalpodautoscalers").
VersionedParams(&opts, scheme.ParameterCodec).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested verticalPodAutoscalers.
func (c *verticalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("verticalpodautoscalers").
VersionedParams(&opts, scheme.ParameterCodec).
Watch()
}
// Create takes the representation of a verticalPodAutoscaler and creates it. Returns the server's representation of the verticalPodAutoscaler, and an error, if there is any.
func (c *verticalPodAutoscalers) Create(verticalPodAutoscaler *v2beta1.VerticalPodAutoscaler) (result *v2beta1.VerticalPodAutoscaler, err error) {
result = &v2beta1.VerticalPodAutoscaler{}
err = c.client.Post().
Namespace(c.ns).
Resource("verticalpodautoscalers").
Body(verticalPodAutoscaler).
Do().
Into(result)
return
}
// Update takes the representation of a verticalPodAutoscaler and updates it. Returns the server's representation of the verticalPodAutoscaler, and an error, if there is any.
func (c *verticalPodAutoscalers) Update(verticalPodAutoscaler *v2beta1.VerticalPodAutoscaler) (result *v2beta1.VerticalPodAutoscaler, err error) {
result = &v2beta1.VerticalPodAutoscaler{}
err = c.client.Put().
Namespace(c.ns).
Resource("verticalpodautoscalers").
Name(verticalPodAutoscaler.Name).
Body(verticalPodAutoscaler).
Do().
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *verticalPodAutoscalers) UpdateStatus(verticalPodAutoscaler *v2beta1.VerticalPodAutoscaler) (result *v2beta1.VerticalPodAutoscaler, err error) {
result = &v2beta1.VerticalPodAutoscaler{}
err = c.client.Put().
Namespace(c.ns).
Resource("verticalpodautoscalers").
Name(verticalPodAutoscaler.Name).
SubResource("status").
Body(verticalPodAutoscaler).
Do().
Into(result)
return
}
// Delete takes name of the verticalPodAutoscaler and deletes it. Returns an error if one occurs.
func (c *verticalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("verticalpodautoscalers").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *verticalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("verticalpodautoscalers").
VersionedParams(&listOptions, scheme.ParameterCodec).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched verticalPodAutoscaler.
func (c *verticalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta1.VerticalPodAutoscaler, err error) {
result = &v2beta1.VerticalPodAutoscaler{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("verticalpodautoscalers").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@@ -25,11 +25,3 @@ type HorizontalPodAutoscalerListerExpansion interface{}
// HorizontalPodAutoscalerNamespaceListerExpansion allows custom methods to be added to
// HorizontalPodAutoscalerNamespaceLister.
type HorizontalPodAutoscalerNamespaceListerExpansion interface{}
// VerticalPodAutoscalerListerExpansion allows custom methods to be added to
// VerticalPodAutoscalerLister.
type VerticalPodAutoscalerListerExpansion interface{}
// VerticalPodAutoscalerNamespaceListerExpansion allows custom methods to be added to
// VerticalPodAutoscalerNamespaceLister.
type VerticalPodAutoscalerNamespaceListerExpansion interface{}

View File

@@ -1,94 +0,0 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by lister-gen. DO NOT EDIT.
package v2beta1
import (
v2beta1 "k8s.io/api/autoscaling/v2beta1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// VerticalPodAutoscalerLister helps list VerticalPodAutoscalers.
type VerticalPodAutoscalerLister interface {
// List lists all VerticalPodAutoscalers in the indexer.
List(selector labels.Selector) (ret []*v2beta1.VerticalPodAutoscaler, err error)
// VerticalPodAutoscalers returns an object that can list and get VerticalPodAutoscalers.
VerticalPodAutoscalers(namespace string) VerticalPodAutoscalerNamespaceLister
VerticalPodAutoscalerListerExpansion
}
// verticalPodAutoscalerLister implements the VerticalPodAutoscalerLister interface.
type verticalPodAutoscalerLister struct {
indexer cache.Indexer
}
// NewVerticalPodAutoscalerLister returns a new VerticalPodAutoscalerLister.
func NewVerticalPodAutoscalerLister(indexer cache.Indexer) VerticalPodAutoscalerLister {
return &verticalPodAutoscalerLister{indexer: indexer}
}
// List lists all VerticalPodAutoscalers in the indexer.
func (s *verticalPodAutoscalerLister) List(selector labels.Selector) (ret []*v2beta1.VerticalPodAutoscaler, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v2beta1.VerticalPodAutoscaler))
})
return ret, err
}
// VerticalPodAutoscalers returns an object that can list and get VerticalPodAutoscalers.
func (s *verticalPodAutoscalerLister) VerticalPodAutoscalers(namespace string) VerticalPodAutoscalerNamespaceLister {
return verticalPodAutoscalerNamespaceLister{indexer: s.indexer, namespace: namespace}
}
// VerticalPodAutoscalerNamespaceLister helps list and get VerticalPodAutoscalers.
type VerticalPodAutoscalerNamespaceLister interface {
// List lists all VerticalPodAutoscalers in the indexer for a given namespace.
List(selector labels.Selector) (ret []*v2beta1.VerticalPodAutoscaler, err error)
// Get retrieves the VerticalPodAutoscaler from the indexer for a given namespace and name.
Get(name string) (*v2beta1.VerticalPodAutoscaler, error)
VerticalPodAutoscalerNamespaceListerExpansion
}
// verticalPodAutoscalerNamespaceLister implements the VerticalPodAutoscalerNamespaceLister
// interface.
type verticalPodAutoscalerNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all VerticalPodAutoscalers in the indexer for a given namespace.
func (s verticalPodAutoscalerNamespaceLister) List(selector labels.Selector) (ret []*v2beta1.VerticalPodAutoscaler, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v2beta1.VerticalPodAutoscaler))
})
return ret, err
}
// Get retrieves the VerticalPodAutoscaler from the indexer for a given namespace and name.
func (s verticalPodAutoscalerNamespaceLister) Get(name string) (*v2beta1.VerticalPodAutoscaler, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v2beta1.Resource("verticalpodautoscaler"), name)
}
return obj.(*v2beta1.VerticalPodAutoscaler), nil
}

View File

@@ -20,6 +20,7 @@ import (
"bytes"
"context"
"crypto/tls"
"errors"
"fmt"
"io"
"net"
@@ -178,21 +179,10 @@ func (a *Authenticator) UpdateTransportConfig(c *transport.Config) error {
return &roundTripper{a, rt}
}
getCert := c.TLS.GetCert
c.TLS.GetCert = func() (*tls.Certificate, error) {
// If previous GetCert is present and returns a valid non-nil
// certificate, use that. Otherwise use cert from exec plugin.
if getCert != nil {
cert, err := getCert()
if err != nil {
return nil, err
}
if cert != nil {
return cert, nil
}
}
return a.cert()
if c.TLS.GetCert != nil {
return errors.New("can't add TLS certificate callback: transport.Config.TLS.GetCert already set")
}
c.TLS.GetCert = a.cert
var dial func(ctx context.Context, network, addr string) (net.Conn, error)
if c.Dial != nil {

View File

@@ -88,7 +88,8 @@ func WriteKey(keyPath string, data []byte) error {
// can't find one, it will generate a new key and store it there.
func LoadOrGenerateKeyFile(keyPath string) (data []byte, wasGenerated bool, err error) {
loadedData, err := ioutil.ReadFile(keyPath)
if err == nil {
// Call verifyKeyData to ensure the file wasn't empty/corrupt.
if err == nil && verifyKeyData(loadedData) {
return loadedData, false, err
}
if !os.IsNotExist(err) {
@@ -181,3 +182,12 @@ func PublicKeysFromFile(file string) ([]interface{}, error) {
}
return keys, nil
}
// verifyKeyData returns true if the provided data appears to be a valid private key.
func verifyKeyData(data []byte) bool {
if len(data) == 0 {
return false
}
_, err := ParsePrivateKeyPEM(data)
return err == nil
}