Merge pull request #6857 from justinsb/k8s_1_13_5

Update kubernetes dependencies to k8s 1.13.5
This commit is contained in:
Kubernetes Prow Robot 2019-05-06 09:05:40 -07:00 committed by GitHub
commit dbae685ee8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1666 changed files with 44588 additions and 48057 deletions

233
Gopkg.lock generated
View File

@ -30,17 +30,18 @@
revision = "d6e3b3328b783f23731bc4d058875b0371ff8109"
[[projects]]
digest = "1:7e11a0a4c2d7792a108629e27c83ff4397b950dede4ccce23f99639bfa84846b"
digest = "1:c82167b21f761be22f6d8b0852efb9f150100f23d41b067130855b1fcb44b398"
name = "github.com/Azure/go-autorest"
packages = [
"autorest",
"autorest/adal",
"autorest/azure",
"autorest/date",
"logger",
"version",
]
pruneopts = "UT"
revision = "bca49d5b51a50dc5bb17bbf6204c711c6dbded06"
revision = "ea233b6412b0421a65dc6160e16c893364664a95"
[[projects]]
digest = "1:51d5156c2de01719fdf90b21197b95bc7e8c9d43ca0d5c3f5c875b8b530077c8"
@ -333,20 +334,9 @@
revision = "edc3ab29cdff8694dd6feb85cfeb4b5f1b38ed9c"
[[projects]]
digest = "1:4a3f40f6dae89af404e86137ecd1d4696fce09cb1472d8943f18001fa160bf9b"
digest = "1:5c709df1e94c6dbee6fdd9699b11e3cdfa06870b1e828e9311e4e879b2ae6a4a"
name = "github.com/docker/docker"
packages = [
"api/types",
"api/types/blkiodev",
"api/types/container",
"api/types/filters",
"api/types/mount",
"api/types/network",
"api/types/registry",
"api/types/strslice",
"api/types/swarm",
"api/types/swarm/runtime",
"api/types/versions",
"pkg/term",
"pkg/term/windows",
]
@ -427,11 +417,11 @@
revision = "dcef7f55730566d41eae5db10e7d6981829720f6"
[[projects]]
digest = "1:e28563a1502222b269250bf79e7807da0574ab03f238f880275fdc1a02baeb39"
digest = "1:36a5ff9459163d104f2af9776c8db63f3eb4339f527a00a9835c8d562eb116ba"
name = "github.com/evanphx/json-patch"
packages = ["."]
pruneopts = "UT"
revision = "36442dbdb585210f8d5a1b45e67aa323c197d5c4"
revision = "5858425f75500d40c52783dce87d085a483ce135"
[[projects]]
branch = "master"
@ -911,16 +901,6 @@
pruneopts = "UT"
revision = "a6d0ee40d4207ea02364bd3b9e8e77b9159ba1eb"
[[projects]]
digest = "1:8e1d3df780654a0c2227b1a4d6f11bfb46d386237f31cc8b5ae8dfa13b55b4ee"
name = "github.com/opencontainers/image-spec"
packages = [
"specs-go",
"specs-go/v1",
]
pruneopts = "UT"
revision = "372ad780f63454fbbbbcc7cf80e5b90245c13e13"
[[projects]]
digest = "1:9072181164e616e422cbfbe48ca9ac249a4d76301ca0876c9f56b937cf214a2f"
name = "github.com/pborman/uuid"
@ -1444,7 +1424,7 @@
revision = "670d4cfef0544295bc27a114dbac37980d83185a"
[[projects]]
digest = "1:16e3493f1ebd6e2c9bf2f05a2c0f0f23bd8bd346dfa27bfc5ccd29d2b77f900c"
digest = "1:59f8bed7a7fbb14fb4d57cd578e2f65b1779b11573e7aa7fdba942198bbf8c07"
name = "k8s.io/api"
packages = [
"admission/v1beta1",
@ -1453,6 +1433,7 @@
"apps/v1",
"apps/v1beta1",
"apps/v1beta2",
"auditregistration/v1alpha1",
"authentication/v1",
"authentication/v1beta1",
"authorization/v1",
@ -1482,19 +1463,19 @@
"storage/v1beta1",
]
pruneopts = "UT"
revision = "b503174bad5991eb66f18247f52e41c3258f6348"
version = "kubernetes-1.12.3"
revision = "5cb15d34447165a97c76ed5a60e4e99c8a01ecfe"
version = "kubernetes-1.13.5"
[[projects]]
digest = "1:fa432f3acd7631bca4888e8d0f1db60cc46aef6a2d85a7f87f0ade54ea0ba56e"
digest = "1:5c8e30a40644c03c864f2a9e3d32b6346ab05c8cafafd1833954c3957abcb160"
name = "k8s.io/apiextensions-apiserver"
packages = ["pkg/features"]
pruneopts = "UT"
revision = "0cd23ebeb6882bd1cdc2cb15fc7b2d72e8a86a5b"
version = "kubernetes-1.12.3"
revision = "475668423e9f8feb5e3cc53f37bfeb1ce37f2ce5"
version = "kubernetes-1.13.5"
[[projects]]
digest = "1:4e7e59a0d72e4be3bf977a19a9830bb8a8ddbfab8f05d8e2107293c8a5270b7c"
digest = "1:a0d97da666a3f987652e7c0bc172c31fe5ce9ef88b276d1b85764a95d2ec7d77"
name = "k8s.io/apimachinery"
packages = [
"pkg/api/equality",
@ -1546,6 +1527,7 @@
"pkg/util/uuid",
"pkg/util/validation",
"pkg/util/validation/field",
"pkg/util/version",
"pkg/util/wait",
"pkg/util/waitgroup",
"pkg/util/yaml",
@ -1556,11 +1538,11 @@
"third_party/forked/golang/reflect",
]
pruneopts = "UT"
revision = "eddba98df674a16931d2d4ba75edc3a389bf633a"
version = "kubernetes-1.12.3"
revision = "86fb29eff6288413d76bd8506874fddd9fccdff0"
version = "kubernetes-1.13.5"
[[projects]]
digest = "1:a47fe8a5f2e77403d8a7000596f3e636b29cc8ca316f7f10921d1df76e0b1321"
digest = "1:d351da0ef73ab81c9fd66835b1c453cbda6a7e712801aa24e1f112754d4e7898"
name = "k8s.io/apiserver"
packages = [
"pkg/admission",
@ -1590,7 +1572,9 @@
"pkg/apis/audit/v1beta1",
"pkg/apis/audit/validation",
"pkg/audit",
"pkg/audit/event",
"pkg/audit/policy",
"pkg/audit/util",
"pkg/authentication/authenticator",
"pkg/authentication/authenticatorfactory",
"pkg/authentication/group",
@ -1601,6 +1585,7 @@
"pkg/authentication/request/websocket",
"pkg/authentication/request/x509",
"pkg/authentication/serviceaccount",
"pkg/authentication/token/cache",
"pkg/authentication/token/tokenfile",
"pkg/authentication/user",
"pkg/authorization/authorizer",
@ -1635,7 +1620,6 @@
"pkg/storage/errors",
"pkg/storage/etcd",
"pkg/storage/etcd/metrics",
"pkg/storage/etcd/util",
"pkg/storage/etcd3",
"pkg/storage/names",
"pkg/storage/storagebackend",
@ -1651,6 +1635,8 @@
"pkg/util/webhook",
"pkg/util/wsstream",
"plugin/pkg/audit/buffered",
"plugin/pkg/audit/dynamic",
"plugin/pkg/audit/dynamic/enforced",
"plugin/pkg/audit/log",
"plugin/pkg/audit/truncate",
"plugin/pkg/audit/webhook",
@ -1658,8 +1644,8 @@
"plugin/pkg/authorizer/webhook",
]
pruneopts = "UT"
revision = "92fdef3a232a23afb9644f6151119b5961b9feab"
version = "kubernetes-1.12.3"
revision = "a4358799e4fec459cf9babfca7c5acf3eed2cef8"
version = "kubernetes-1.13.5"
[[projects]]
branch = "master"
@ -1674,7 +1660,7 @@
revision = "0848ac45ae52dd684c82242dfb4e5de83399d4f2"
[[projects]]
digest = "1:bd6d44580a9f4585ab6ab56706060d52932ce8b005909cb908e2f144671936e6"
digest = "1:0b4149a84713bc9678ddab5ae60371b40f80422237e9475ea9714fb24554c4be"
name = "k8s.io/client-go"
packages = [
"discovery",
@ -1688,6 +1674,8 @@
"informers/apps/v1",
"informers/apps/v1beta1",
"informers/apps/v1beta2",
"informers/auditregistration",
"informers/auditregistration/v1alpha1",
"informers/autoscaling",
"informers/autoscaling/v1",
"informers/autoscaling/v2beta1",
@ -1737,6 +1725,8 @@
"kubernetes/typed/apps/v1beta1/fake",
"kubernetes/typed/apps/v1beta2",
"kubernetes/typed/apps/v1beta2/fake",
"kubernetes/typed/auditregistration/v1alpha1",
"kubernetes/typed/auditregistration/v1alpha1/fake",
"kubernetes/typed/authentication/v1",
"kubernetes/typed/authentication/v1/fake",
"kubernetes/typed/authentication/v1beta1",
@ -1794,6 +1784,7 @@
"listers/apps/v1",
"listers/apps/v1beta1",
"listers/apps/v1beta2",
"listers/auditregistration/v1alpha1",
"listers/autoscaling/v1",
"listers/autoscaling/v2beta1",
"listers/autoscaling/v2beta2",
@ -1865,11 +1856,19 @@
"util/retry",
]
pruneopts = "UT"
revision = "d082d5923d3cc0bfbb066ee5fbdea3d0ca79acf8"
version = "kubernetes-1.12.3"
revision = "7621a5ebb88b1e49ce7e7837ae8e99ca030a3c13"
version = "kubernetes-1.13.5"
[[projects]]
digest = "1:4e2addcdbe0330f43800c1fcb905fc7a21b86415dfcca619e5c606c87257af1b"
branch = "master"
digest = "1:b9c733f569460e3b446bc1632550df70c7dbe0efce92bf1f5e0d6795860d4346"
name = "k8s.io/cloud-provider"
packages = ["."]
pruneopts = "UT"
revision = "0a4f4cbb5a664deb4639d7d9bf5bbde3bb3603c1"
[[projects]]
digest = "1:dc1ae99dcab96913d81ae970b1f7a7411a54199b14bfb17a7e86f9a56979c720"
name = "k8s.io/code-generator"
packages = [
"cmd/client-gen",
@ -1887,13 +1886,11 @@
"cmd/deepcopy-gen/args",
"cmd/defaulter-gen",
"cmd/defaulter-gen/args",
"cmd/openapi-gen",
"cmd/openapi-gen/args",
"pkg/util",
]
pruneopts = "T"
revision = "3dcf91f64f638563e5106f21f50c31fa361c918d"
version = "kubernetes-1.12.3"
revision = "c2090bec4d9b1fb25de3812f868accc2bc9ecbae"
version = "kubernetes-1.13.5"
[[projects]]
branch = "master"
@ -1909,7 +1906,7 @@
revision = "55e69c84e236c638e35d7726b50181b507d35c22"
[[projects]]
digest = "1:fb0b799b5c7bd70d1cef3537e864457291f62e5a2e94ab659232e9958be5a869"
digest = "1:da31d8be5af84b69ef83b212d833d8e10930cd9e8a876780a20099ea306c4c13"
name = "k8s.io/gengo"
packages = [
"args",
@ -1922,7 +1919,7 @@
"types",
]
pruneopts = "UT"
revision = "fdcf9f9480fdd5bf2b3c3df9bf4ecd22b25b87e2"
revision = "51747d6e00da1fc578d5a333a93bb2abcbce7a95"
[[projects]]
digest = "1:2578ea84d8555a62f49e5f750848ec5d3bad2e5ba9e3977186e407c7501d3b95"
@ -1933,9 +1930,18 @@
version = "v2.9.0"
[[projects]]
digest = "1:3ed676d888b0a53cc0de46209ed8b27672a188fcf66886cdb1791029ec5d5028"
digest = "1:c696379ad201c1e86591785579e16bf6cf886c362e9a7534e8eb0d1028b20582"
name = "k8s.io/klog"
packages = ["."]
pruneopts = "UT"
revision = "e531227889390a39d9533dde61f590fe9f4b0035"
version = "v0.3.0"
[[projects]]
digest = "1:1527ee92ac13cab6c7451fac7893202ab3d32eb6ebb73d496d8dc0bece51ebf2"
name = "k8s.io/kube-openapi"
packages = [
"cmd/openapi-gen",
"cmd/openapi-gen/args",
"pkg/builder",
"pkg/common",
@ -1948,25 +1954,16 @@
"pkg/util/sets",
]
pruneopts = "UT"
revision = "0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803"
revision = "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d"
[[projects]]
digest = "1:e5af305bed43ec95303ff4206940c2339cb52137359e38bc924c87bfd19d158e"
digest = "1:31f0c31c7c520e2345f20bff9694858f2ebf576b111a49725aaf1f1a158e7077"
name = "k8s.io/kubernetes"
packages = [
"pkg/api/events",
"pkg/api/legacyscheme",
"pkg/api/pod",
"pkg/api/ref",
"pkg/api/resource",
"pkg/api/service",
"pkg/api/v1/pod",
"pkg/api/v1/resource",
"pkg/api/v1/service",
"pkg/apis/admissionregistration",
"pkg/apis/admissionregistration/install",
"pkg/apis/admissionregistration/v1alpha1",
"pkg/apis/admissionregistration/v1beta1",
"pkg/apis/apps",
"pkg/apis/apps/install",
"pkg/apis/apps/v1",
@ -1998,7 +1995,6 @@
"pkg/apis/coordination/v1beta1",
"pkg/apis/core",
"pkg/apis/core/helper",
"pkg/apis/core/helper/qos",
"pkg/apis/core/install",
"pkg/apis/core/pods",
"pkg/apis/core/v1",
@ -2011,8 +2007,6 @@
"pkg/apis/extensions/install",
"pkg/apis/extensions/v1beta1",
"pkg/apis/networking",
"pkg/apis/networking/install",
"pkg/apis/networking/v1",
"pkg/apis/policy",
"pkg/apis/policy/install",
"pkg/apis/policy/v1beta1",
@ -2035,69 +2029,91 @@
"pkg/apis/storage/v1alpha1",
"pkg/apis/storage/v1beta1",
"pkg/capabilities",
"pkg/client/clientset_generated/internalclientset",
"pkg/client/clientset_generated/internalclientset/scheme",
"pkg/client/clientset_generated/internalclientset/typed/admissionregistration/internalversion",
"pkg/client/clientset_generated/internalclientset/typed/apps/internalversion",
"pkg/client/clientset_generated/internalclientset/typed/authentication/internalversion",
"pkg/client/clientset_generated/internalclientset/typed/authorization/internalversion",
"pkg/client/clientset_generated/internalclientset/typed/autoscaling/internalversion",
"pkg/client/clientset_generated/internalclientset/typed/batch/internalversion",
"pkg/client/clientset_generated/internalclientset/typed/certificates/internalversion",
"pkg/client/clientset_generated/internalclientset/typed/coordination/internalversion",
"pkg/client/clientset_generated/internalclientset/typed/core/internalversion",
"pkg/client/clientset_generated/internalclientset/typed/events/internalversion",
"pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion",
"pkg/client/clientset_generated/internalclientset/typed/networking/internalversion",
"pkg/client/clientset_generated/internalclientset/typed/policy/internalversion",
"pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion",
"pkg/client/clientset_generated/internalclientset/typed/scheduling/internalversion",
"pkg/client/clientset_generated/internalclientset/typed/settings/internalversion",
"pkg/client/clientset_generated/internalclientset/typed/storage/internalversion",
"pkg/client/metrics/prometheus",
"pkg/cloudprovider",
"pkg/cloudprovider/providers/aws",
"pkg/cloudprovider/providers/gce",
"pkg/cloudprovider/providers/gce/cloud",
"pkg/cloudprovider/providers/gce/cloud/filter",
"pkg/cloudprovider/providers/gce/cloud/meta",
"pkg/cloudprovider/providers/gce/cloud/mock",
"pkg/controller",
"pkg/controller/deployment/util",
"pkg/credentialprovider",
"pkg/credentialprovider/aws",
"pkg/features",
"pkg/fieldpath",
"pkg/generated",
"pkg/kubectl",
"pkg/kubectl/apply",
"pkg/kubectl/apply/parse",
"pkg/kubectl/apply/strategy",
"pkg/kubectl/apps",
"pkg/kubectl/cmd",
"pkg/kubectl/cmd/annotate",
"pkg/kubectl/cmd/apiresources",
"pkg/kubectl/cmd/apply",
"pkg/kubectl/cmd/attach",
"pkg/kubectl/cmd/auth",
"pkg/kubectl/cmd/autoscale",
"pkg/kubectl/cmd/certificates",
"pkg/kubectl/cmd/clusterinfo",
"pkg/kubectl/cmd/completion",
"pkg/kubectl/cmd/config",
"pkg/kubectl/cmd/convert",
"pkg/kubectl/cmd/cp",
"pkg/kubectl/cmd/create",
"pkg/kubectl/cmd/delete",
"pkg/kubectl/cmd/describe",
"pkg/kubectl/cmd/diff",
"pkg/kubectl/cmd/drain",
"pkg/kubectl/cmd/edit",
"pkg/kubectl/cmd/exec",
"pkg/kubectl/cmd/explain",
"pkg/kubectl/cmd/expose",
"pkg/kubectl/cmd/get",
"pkg/kubectl/cmd/label",
"pkg/kubectl/cmd/logs",
"pkg/kubectl/cmd/options",
"pkg/kubectl/cmd/patch",
"pkg/kubectl/cmd/plugin",
"pkg/kubectl/cmd/portforward",
"pkg/kubectl/cmd/proxy",
"pkg/kubectl/cmd/replace",
"pkg/kubectl/cmd/rollingupdate",
"pkg/kubectl/cmd/rollout",
"pkg/kubectl/cmd/scalejob",
"pkg/kubectl/cmd/run",
"pkg/kubectl/cmd/scale",
"pkg/kubectl/cmd/set",
"pkg/kubectl/cmd/set/env",
"pkg/kubectl/cmd/templates",
"pkg/kubectl/cmd/taint",
"pkg/kubectl/cmd/top",
"pkg/kubectl/cmd/util",
"pkg/kubectl/cmd/util/editor",
"pkg/kubectl/cmd/util/editor/crlf",
"pkg/kubectl/cmd/util/openapi",
"pkg/kubectl/cmd/util/openapi/validation",
"pkg/kubectl/cmd/version",
"pkg/kubectl/cmd/wait",
"pkg/kubectl/describe",
"pkg/kubectl/describe/versioned",
"pkg/kubectl/explain",
"pkg/kubectl/generate",
"pkg/kubectl/generate/versioned",
"pkg/kubectl/generated",
"pkg/kubectl/metricsutil",
"pkg/kubectl/polymorphichelpers",
"pkg/kubectl/proxy",
"pkg/kubectl/scheme",
"pkg/kubectl/util",
"pkg/kubectl/util/certificate",
"pkg/kubectl/util/deployment",
"pkg/kubectl/util/event",
"pkg/kubectl/util/fieldpath",
"pkg/kubectl/util/hash",
"pkg/kubectl/util/i18n",
"pkg/kubectl/util/podutils",
"pkg/kubectl/util/printers",
"pkg/kubectl/util/qos",
"pkg/kubectl/util/rbac",
"pkg/kubectl/util/resource",
"pkg/kubectl/util/slice",
"pkg/kubectl/util/storage",
"pkg/kubectl/util/templates",
"pkg/kubectl/util/term",
"pkg/kubectl/validation",
"pkg/kubelet/apis",
@ -2107,27 +2123,21 @@
"pkg/printers/internalversion",
"pkg/registry/rbac/reconciliation",
"pkg/registry/rbac/validation",
"pkg/scheduler/algorithm",
"pkg/scheduler/algorithm/priorities/util",
"pkg/scheduler/api",
"pkg/scheduler/cache",
"pkg/scheduler/util",
"pkg/security/apparmor",
"pkg/serviceaccount",
"pkg/util/file",
"pkg/util/hash",
"pkg/util/interrupt",
"pkg/util/io",
"pkg/util/labels",
"pkg/util/mount",
"pkg/util/net/sets",
"pkg/util/node",
"pkg/util/nsenter",
"pkg/util/parsers",
"pkg/util/slice",
"pkg/util/resizefs",
"pkg/util/strings",
"pkg/util/taints",
"pkg/util/version",
"pkg/version",
"pkg/volume",
"pkg/volume/util",
@ -2137,11 +2147,11 @@
"pkg/volume/util/volumepathhandler",
]
pruneopts = "UT"
revision = "435f92c719f279a3a67808c80521ea17d5715c66"
version = "v1.12.3"
revision = "2166946f41b36dea2c4626f90a77706f426cdea2"
version = "v1.13.5"
[[projects]]
digest = "1:f86bc539772df0ae5d4245697dc882ae1ade82c5800da74ba921df757ab3c66a"
digest = "1:0306ff09375dc31052d211f0e9db9b9b1156e5306d36ab0080e432bc9972262a"
name = "k8s.io/metrics"
packages = [
"pkg/apis/metrics",
@ -2153,18 +2163,26 @@
"pkg/client/clientset/versioned/typed/metrics/v1beta1",
]
pruneopts = "UT"
revision = "bbe7891c54bfbd56e7ac43c280318ec6cd8cca55"
version = "kubernetes-1.12.3"
revision = "29123f6a4aa672ecb288b824b0c5de05a4833f29"
version = "kubernetes-1.13.5"
[[projects]]
digest = "1:ae10a16a74957e6cda3836ba64ec1b052b4707d66923cede097db76dc372e09f"
digest = "1:66d2fc6b85d80bcbed8e606a04887eedf7504ffc9a3eed0e15ecbb8b82daebf2"
name = "k8s.io/utils"
packages = [
"exec",
"pointer",
]
pruneopts = "UT"
revision = "1bd4f387aa67de2eec07a362c10bc8bd7fe74237"
revision = "66066c83e385e385ccc3c964b44fd7dcd413d0ed"
[[projects]]
digest = "1:7719608fe0b52a4ece56c2dde37bedd95b938677d1ab0f84b8a7852e4c59f849"
name = "sigs.k8s.io/yaml"
packages = ["."]
pruneopts = "UT"
revision = "fd68e9863619f6ec2fdd8625fe1f02e7c877e480"
version = "v1.1.0"
[[projects]]
digest = "1:96f9b7c99c55e6063371088376d57d398f42888dedd08ab5d35065aba11e3965"
@ -2367,17 +2385,18 @@
"k8s.io/code-generator/cmd/conversion-gen",
"k8s.io/code-generator/cmd/deepcopy-gen",
"k8s.io/code-generator/cmd/defaulter-gen",
"k8s.io/code-generator/cmd/openapi-gen",
"k8s.io/helm/pkg/strvals",
"k8s.io/klog",
"k8s.io/kube-openapi/cmd/openapi-gen",
"k8s.io/kube-openapi/pkg/common",
"k8s.io/kubernetes/pkg/client/metrics/prometheus",
"k8s.io/kubernetes/pkg/cloudprovider/providers/aws",
"k8s.io/kubernetes/pkg/cloudprovider/providers/gce",
"k8s.io/kubernetes/pkg/kubectl/cmd",
"k8s.io/kubernetes/pkg/kubectl/cmd/templates",
"k8s.io/kubernetes/pkg/kubectl/cmd/util",
"k8s.io/kubernetes/pkg/kubectl/cmd/util/editor",
"k8s.io/kubernetes/pkg/kubectl/util/i18n",
"k8s.io/kubernetes/pkg/kubectl/util/templates",
"k8s.io/kubernetes/pkg/util/mount",
"k8s.io/kubernetes/pkg/util/nsenter",
"k8s.io/utils/exec",

View File

@ -10,7 +10,7 @@ required = [
"k8s.io/code-generator/cmd/defaulter-gen",
# Needed for docs generation
"k8s.io/code-generator/cmd/openapi-gen",
"k8s.io/kube-openapi/cmd/openapi-gen",
"github.com/kubernetes-incubator/apiserver-builder/cmd/apiserver-boot",
"github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen",
"github.com/kubernetes-incubator/reference-docs/gen-apidocs",
@ -49,34 +49,37 @@ required = [
# Core kubernetes components
[[override]]
name = "k8s.io/code-generator"
version = "kubernetes-1.12.3"
version = "kubernetes-1.13.5"
[[override]]
name = "k8s.io/apimachinery"
version = "kubernetes-1.12.3"
version = "kubernetes-1.13.5"
[[override]]
name = "k8s.io/api"
version = "kubernetes-1.12.3"
version = "kubernetes-1.13.5"
[[override]]
name = "k8s.io/gengo"
revision = "51747d6e00da1fc578d5a333a93bb2abcbce7a95" # version specified in 1.13.5
[[override]]
name = "k8s.io/utils"
revision = "1bd4f387aa67de2eec07a362c10bc8bd7fe74237" # Latest
revision = "66066c83e385e385ccc3c964b44fd7dcd413d0ed" # version specified in 1.13.5
[[override]]
name = "k8s.io/kube-openapi"
revision = "0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803" # version specified in 1.12.3
revision = "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" # version specified in 1.13.5
[[override]]
name = "k8s.io/client-go"
version = "kubernetes-1.12.3"
version = "kubernetes-1.13.5"
[[override]]
name = "k8s.io/apiserver"
version = "kubernetes-1.12.3"
version = "kubernetes-1.13.5"
[[override]]
name = "k8s.io/metrics"
version = "kubernetes-1.12.3"
version = "kubernetes-1.13.5"
[[override]]
name = "k8s.io/apiextensions-apiserver"
version = "kubernetes-1.12.3"
version = "kubernetes-1.13.5"
[[override]]
name = "k8s.io/kubernetes"
version = "v1.12.3"
version = "v1.13.5"
# Needed for docs generation
[[override]]
@ -88,9 +91,6 @@ required = [
# These come from godeps.json in kubernetes
[[override]]
name = "k8s.io/gengo"
revision = "fdcf9f9480fdd5bf2b3c3df9bf4ecd22b25b87e2"
[[override]]
name = "github.com/hashicorp/hcl"
revision = "d8c773c4cba11b11539e3d45f93daeaa5dcf1fa1"
@ -241,7 +241,7 @@ required = [
revision = "d6e3b3328b783f23731bc4d058875b0371ff8109"
[[override]]
name = "github.com/Azure/go-autorest"
revision = "bca49d5b51a50dc5bb17bbf6204c711c6dbded06"
revision = "ea233b6412b0421a65dc6160e16c893364664a95"
[[override]]
name = "golang.org/x/net"
revision = "1c05540f6879653db88113bc4a2b70aec4bd491f"
@ -378,7 +378,7 @@ required = [
revision = "593d64559f7600f29581a3ee42177f5dbded27a9"
[[override]]
name = "github.com/evanphx/json-patch"
revision = "36442dbdb585210f8d5a1b45e67aa323c197d5c4"
revision = "5858425f75500d40c52783dce87d085a483ce135"
[[override]]
name = "github.com/pmezard/go-difflib"
revision = "d8ed2627bdf02c080bf22230dbb337003b7aba2d"

View File

@ -123,10 +123,10 @@ go_library(
"//vendor/k8s.io/client-go/tools/clientcmd:go_default_library",
"//vendor/k8s.io/client-go/util/homedir:go_default_library",
"//vendor/k8s.io/helm/pkg/strvals:go_default_library",
"//vendor/k8s.io/kubernetes/pkg/kubectl/cmd/templates:go_default_library",
"//vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util:go_default_library",
"//vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/editor:go_default_library",
"//vendor/k8s.io/kubernetes/pkg/kubectl/util/i18n:go_default_library",
"//vendor/k8s.io/kubernetes/pkg/kubectl/util/templates:go_default_library",
],
)

View File

@ -24,8 +24,8 @@ import (
"github.com/spf13/cobra"
"k8s.io/kops/cmd/kops/util"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
const boilerPlate = `

View File

@ -33,9 +33,9 @@ import (
"k8s.io/kops/upup/pkg/fi/cloudup"
"k8s.io/kops/util/pkg/text"
"k8s.io/kops/util/pkg/vfs"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
type CreateOptions struct {

View File

@ -53,8 +53,8 @@ import (
"k8s.io/kops/upup/pkg/fi/cloudup/awsup"
"k8s.io/kops/upup/pkg/fi/cloudup/gce"
"k8s.io/kops/upup/pkg/fi/utils"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
const (

View File

@ -33,9 +33,9 @@ import (
"k8s.io/kops/pkg/kopscodecs"
"k8s.io/kops/pkg/try"
"k8s.io/kops/upup/pkg/fi/cloudup"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/cmd/util/editor"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
type CreateInstanceGroupOptions struct {

View File

@ -21,8 +21,8 @@ import (
"github.com/spf13/cobra"
"k8s.io/kops/cmd/kops/util"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -26,8 +26,8 @@ import (
"github.com/spf13/cobra"
"k8s.io/kops/cmd/kops/util"
"k8s.io/kops/upup/pkg/fi"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -26,8 +26,8 @@ import (
"k8s.io/kops/cmd/kops/util"
"k8s.io/kops/pkg/apis/kops"
"k8s.io/kops/upup/pkg/fi"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -21,8 +21,8 @@ import (
"github.com/spf13/cobra"
"k8s.io/kops/cmd/kops/util"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -29,8 +29,8 @@ import (
"k8s.io/kops/pkg/pki"
"k8s.io/kops/upup/pkg/fi"
"k8s.io/kops/upup/pkg/fi/utils"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -24,8 +24,8 @@ import (
"github.com/spf13/cobra"
"k8s.io/kops/cmd/kops/util"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -25,8 +25,8 @@ import (
"k8s.io/kops/cmd/kops/util"
"k8s.io/kops/upup/pkg/fi"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -32,9 +32,9 @@ import (
"k8s.io/kops/pkg/sshcredentials"
"k8s.io/kops/util/pkg/text"
"k8s.io/kops/util/pkg/vfs"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
type DeleteOptions struct {

View File

@ -32,8 +32,8 @@ import (
"k8s.io/kops/upup/pkg/fi/cloudup"
"k8s.io/kops/upup/pkg/fi/cloudup/awsup"
"k8s.io/kops/util/pkg/tables"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
type DeleteClusterOptions struct {

View File

@ -28,8 +28,8 @@ import (
"k8s.io/kops/pkg/instancegroups"
"k8s.io/kops/upup/pkg/fi/cloudup"
"k8s.io/kops/util/pkg/ui"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -24,8 +24,8 @@ import (
"k8s.io/kops/cmd/kops/util"
"k8s.io/kops/pkg/apis/kops"
"k8s.io/kops/upup/pkg/fi"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -18,8 +18,8 @@ package main
import (
"github.com/spf13/cobra"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -28,8 +28,8 @@ import (
"github.com/spf13/cobra"
"k8s.io/kops/pkg/apis/kops"
"k8s.io/kops/upup/pkg/fi"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -21,8 +21,8 @@ import (
"github.com/spf13/cobra"
"k8s.io/kops/cmd/kops/util"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -36,9 +36,9 @@ import (
"k8s.io/kops/pkg/kopscodecs"
"k8s.io/kops/pkg/try"
"k8s.io/kops/upup/pkg/fi/cloudup"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
util_editor "k8s.io/kubernetes/pkg/kubectl/cmd/util/editor"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
type EditClusterOptions struct {

View File

@ -32,9 +32,9 @@ import (
"k8s.io/kops/pkg/kopscodecs"
"k8s.io/kops/pkg/try"
"k8s.io/kops/upup/pkg/fi/cloudup"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/cmd/util/editor"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -21,8 +21,8 @@ import (
"github.com/spf13/cobra"
"k8s.io/kops/cmd/kops/util"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -25,8 +25,8 @@ import (
"k8s.io/kops/pkg/commands"
"k8s.io/kops/pkg/kubeconfig"
"k8s.io/kops/upup/pkg/fi"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -28,8 +28,8 @@ import (
"k8s.io/kops/cmd/kops/util"
api "k8s.io/kops/pkg/apis/kops"
"k8s.io/kops/pkg/kopscodecs"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -31,8 +31,8 @@ import (
api "k8s.io/kops/pkg/apis/kops"
"k8s.io/kops/pkg/apis/kops/registry"
"k8s.io/kops/util/pkg/tables"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -29,8 +29,8 @@ import (
api "k8s.io/kops/pkg/apis/kops"
"k8s.io/kops/pkg/formatter"
"k8s.io/kops/util/pkg/tables"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -29,8 +29,8 @@ import (
"k8s.io/kops/pkg/sshcredentials"
"k8s.io/kops/upup/pkg/fi"
"k8s.io/kops/util/pkg/tables"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
// SecretTypeSSHPublicKey is set in a KeysetItem.Type for an SSH public keypair

View File

@ -18,8 +18,8 @@ package main
import (
"github.com/spf13/cobra"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -31,9 +31,9 @@ import (
"k8s.io/kops/pkg/kopscodecs"
"k8s.io/kops/util/pkg/text"
"k8s.io/kops/util/pkg/vfs"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -39,8 +39,8 @@ import (
"k8s.io/kops/pkg/pretty"
"k8s.io/kops/upup/pkg/fi/cloudup"
"k8s.io/kops/util/pkg/tables"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -36,8 +36,8 @@ import (
"k8s.io/kops/pkg/client/simple"
"k8s.io/kops/pkg/kubeconfig"
"k8s.io/kops/upup/pkg/kutil"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
const (

View File

@ -21,8 +21,8 @@ import (
"github.com/spf13/cobra"
"k8s.io/kops/cmd/kops/util"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -22,8 +22,8 @@ import (
"strings"
"github.com/spf13/cobra"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
"k8s.io/kops/cmd/kops/util"
"k8s.io/kops/pkg/commands"

View File

@ -21,8 +21,8 @@ import (
"github.com/spf13/cobra"
"k8s.io/kops/cmd/kops/util"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -35,8 +35,8 @@ import (
"k8s.io/kops/pkg/try"
"k8s.io/kops/upup/pkg/kutil"
"k8s.io/kops/util/pkg/vfs"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -26,8 +26,8 @@ import (
api "k8s.io/kops/pkg/apis/kops"
"k8s.io/kops/upup/pkg/fi/cloudup/awsup"
"k8s.io/kops/upup/pkg/kutil"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -28,8 +28,8 @@ import (
"k8s.io/kops/pkg/resources"
resourceops "k8s.io/kops/pkg/resources/ops"
"k8s.io/kops/upup/pkg/fi/cloudup"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -28,8 +28,8 @@ import (
"github.com/ghodss/yaml"
"github.com/spf13/cobra"
"k8s.io/helm/pkg/strvals"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
"k8s.io/kops/cmd/kops/util"
"k8s.io/kops/pkg/try"

View File

@ -21,8 +21,8 @@ import (
"github.com/spf13/cobra"
"k8s.io/kops/cmd/kops/util"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -36,8 +36,8 @@ import (
"k8s.io/kops/upup/pkg/fi/cloudup"
"k8s.io/kops/upup/pkg/fi/utils"
"k8s.io/kops/upup/pkg/kutil"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -18,8 +18,8 @@ package main
import (
"github.com/spf13/cobra"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -21,8 +21,8 @@ import (
"github.com/spf13/cobra"
"k8s.io/kops/cmd/kops/util"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -22,8 +22,8 @@ import (
"github.com/spf13/cobra"
"k8s.io/kops/cmd/kops/util"
"k8s.io/kops/pkg/commands"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
"k8s.io/kubernetes/pkg/kubectl/util/templates"
)
var (

View File

@ -1,4 +1,4 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
@ -19,9 +19,3 @@ go_library(
"//vendor/k8s.io/apiserver/pkg/server:go_default_library",
],
)
go_test(
name = "go_default_test",
srcs = ["scheme_test.go"],
embed = [":go_default_library"],
)

View File

@ -41,6 +41,8 @@ import (
const defaultEtcdPathPrefix = "/registry/kops.kubernetes.io"
var processInfo genericoptions.ProcessInfo
type KopsServerOptions struct {
RecommendedOptions *genericoptions.RecommendedOptions
@ -54,12 +56,12 @@ type KopsServerOptions struct {
func NewCommandStartKopsServer(out, err io.Writer) *cobra.Command {
o := &KopsServerOptions{
RecommendedOptions: genericoptions.NewRecommendedOptions(defaultEtcdPathPrefix,
apiserver.Codecs.LegacyCodec(v1alpha2.SchemeGroupVersion)),
apiserver.Codecs.LegacyCodec(v1alpha2.SchemeGroupVersion), &processInfo),
StdOut: out,
StdErr: err,
}
o.RecommendedOptions.Etcd.StorageConfig.Type = storagebackend.StorageTypeETCD2
//o.RecommendedOptions.Etcd.StorageConfig.Type = storagebackend.StorageTypeETCD2
o.RecommendedOptions.Etcd.StorageConfig.Codec = apiserver.Codecs.LegacyCodec(v1alpha2.SchemeGroupVersion)
//o.SecureServing.ServingOptions.BindPort = 443
@ -131,9 +133,9 @@ func (o KopsServerOptions) Config() (*apiserver.Config, error) {
glog.Warningf("Authentication/Authorization disabled")
}
if err := o.RecommendedOptions.Audit.ApplyTo(&config.Config); err != nil {
return nil, err
}
//if err := o.RecommendedOptions.Audit.ApplyTo(&config.Config); err != nil {
// return nil, err
//}
if err := o.RecommendedOptions.Features.ApplyTo(&config.Config); err != nil {
return nil, err
}

View File

@ -19,6 +19,8 @@ limitations under the License.
package internalversion
import (
"time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@ -75,11 +77,16 @@ func (c *clusters) Get(name string, options v1.GetOptions) (result *kops.Cluster
// List takes label and field selectors, and returns the list of Clusters that match those selectors.
func (c *clusters) List(opts v1.ListOptions) (result *kops.ClusterList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &kops.ClusterList{}
err = c.client.Get().
Namespace(c.ns).
Resource("clusters").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
@ -87,11 +94,16 @@ func (c *clusters) List(opts v1.ListOptions) (result *kops.ClusterList, err erro
// Watch returns a watch.Interface that watches the requested clusters.
func (c *clusters) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("clusters").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
@ -133,10 +145,15 @@ func (c *clusters) Delete(name string, options *v1.DeleteOptions) error {
// DeleteCollection deletes a collection of objects.
func (c *clusters) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("clusters").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()

View File

@ -119,7 +119,7 @@ func (c *FakeClusters) DeleteCollection(options *v1.DeleteOptions, listOptions v
// Patch applies the patch and returns the patched cluster.
func (c *FakeClusters) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *kops.Cluster, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(clustersResource, c.ns, name, data, subresources...), &kops.Cluster{})
Invokes(testing.NewPatchSubresourceAction(clustersResource, c.ns, name, pt, data, subresources...), &kops.Cluster{})
if obj == nil {
return nil, err

View File

@ -119,7 +119,7 @@ func (c *FakeInstanceGroups) DeleteCollection(options *v1.DeleteOptions, listOpt
// Patch applies the patch and returns the patched instanceGroup.
func (c *FakeInstanceGroups) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *kops.InstanceGroup, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(instancegroupsResource, c.ns, name, data, subresources...), &kops.InstanceGroup{})
Invokes(testing.NewPatchSubresourceAction(instancegroupsResource, c.ns, name, pt, data, subresources...), &kops.InstanceGroup{})
if obj == nil {
return nil, err

View File

@ -119,7 +119,7 @@ func (c *FakeKeysets) DeleteCollection(options *v1.DeleteOptions, listOptions v1
// Patch applies the patch and returns the patched keyset.
func (c *FakeKeysets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *kops.Keyset, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(keysetsResource, c.ns, name, data, subresources...), &kops.Keyset{})
Invokes(testing.NewPatchSubresourceAction(keysetsResource, c.ns, name, pt, data, subresources...), &kops.Keyset{})
if obj == nil {
return nil, err

View File

@ -119,7 +119,7 @@ func (c *FakeSSHCredentials) DeleteCollection(options *v1.DeleteOptions, listOpt
// Patch applies the patch and returns the patched sSHCredential.
func (c *FakeSSHCredentials) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *kops.SSHCredential, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(sshcredentialsResource, c.ns, name, data, subresources...), &kops.SSHCredential{})
Invokes(testing.NewPatchSubresourceAction(sshcredentialsResource, c.ns, name, pt, data, subresources...), &kops.SSHCredential{})
if obj == nil {
return nil, err

View File

@ -19,6 +19,8 @@ limitations under the License.
package internalversion
import (
"time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@ -75,11 +77,16 @@ func (c *instanceGroups) Get(name string, options v1.GetOptions) (result *kops.I
// List takes label and field selectors, and returns the list of InstanceGroups that match those selectors.
func (c *instanceGroups) List(opts v1.ListOptions) (result *kops.InstanceGroupList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &kops.InstanceGroupList{}
err = c.client.Get().
Namespace(c.ns).
Resource("instancegroups").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
@ -87,11 +94,16 @@ func (c *instanceGroups) List(opts v1.ListOptions) (result *kops.InstanceGroupLi
// Watch returns a watch.Interface that watches the requested instanceGroups.
func (c *instanceGroups) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("instancegroups").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
@ -133,10 +145,15 @@ func (c *instanceGroups) Delete(name string, options *v1.DeleteOptions) error {
// DeleteCollection deletes a collection of objects.
func (c *instanceGroups) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("instancegroups").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()

View File

@ -19,6 +19,8 @@ limitations under the License.
package internalversion
import (
"time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@ -75,11 +77,16 @@ func (c *keysets) Get(name string, options v1.GetOptions) (result *kops.Keyset,
// List takes label and field selectors, and returns the list of Keysets that match those selectors.
func (c *keysets) List(opts v1.ListOptions) (result *kops.KeysetList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &kops.KeysetList{}
err = c.client.Get().
Namespace(c.ns).
Resource("keysets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
@ -87,11 +94,16 @@ func (c *keysets) List(opts v1.ListOptions) (result *kops.KeysetList, err error)
// Watch returns a watch.Interface that watches the requested keysets.
func (c *keysets) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("keysets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
@ -133,10 +145,15 @@ func (c *keysets) Delete(name string, options *v1.DeleteOptions) error {
// DeleteCollection deletes a collection of objects.
func (c *keysets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("keysets").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()

View File

@ -19,6 +19,8 @@ limitations under the License.
package internalversion
import (
"time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@ -75,11 +77,16 @@ func (c *sSHCredentials) Get(name string, options v1.GetOptions) (result *kops.S
// List takes label and field selectors, and returns the list of SSHCredentials that match those selectors.
func (c *sSHCredentials) List(opts v1.ListOptions) (result *kops.SSHCredentialList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &kops.SSHCredentialList{}
err = c.client.Get().
Namespace(c.ns).
Resource("sshcredentials").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
@ -87,11 +94,16 @@ func (c *sSHCredentials) List(opts v1.ListOptions) (result *kops.SSHCredentialLi
// Watch returns a watch.Interface that watches the requested sSHCredentials.
func (c *sSHCredentials) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("sshcredentials").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
@ -133,10 +145,15 @@ func (c *sSHCredentials) Delete(name string, options *v1.DeleteOptions) error {
// DeleteCollection deletes a collection of objects.
func (c *sSHCredentials) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("sshcredentials").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()

View File

@ -19,6 +19,8 @@ limitations under the License.
package v1alpha1
import (
"time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@ -75,11 +77,16 @@ func (c *clusters) Get(name string, options v1.GetOptions) (result *v1alpha1.Clu
// List takes label and field selectors, and returns the list of Clusters that match those selectors.
func (c *clusters) List(opts v1.ListOptions) (result *v1alpha1.ClusterList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.ClusterList{}
err = c.client.Get().
Namespace(c.ns).
Resource("clusters").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
@ -87,11 +94,16 @@ func (c *clusters) List(opts v1.ListOptions) (result *v1alpha1.ClusterList, err
// Watch returns a watch.Interface that watches the requested clusters.
func (c *clusters) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("clusters").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
@ -133,10 +145,15 @@ func (c *clusters) Delete(name string, options *v1.DeleteOptions) error {
// DeleteCollection deletes a collection of objects.
func (c *clusters) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("clusters").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()

View File

@ -119,7 +119,7 @@ func (c *FakeClusters) DeleteCollection(options *v1.DeleteOptions, listOptions v
// Patch applies the patch and returns the patched cluster.
func (c *FakeClusters) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Cluster, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(clustersResource, c.ns, name, data, subresources...), &v1alpha1.Cluster{})
Invokes(testing.NewPatchSubresourceAction(clustersResource, c.ns, name, pt, data, subresources...), &v1alpha1.Cluster{})
if obj == nil {
return nil, err

View File

@ -119,7 +119,7 @@ func (c *FakeInstanceGroups) DeleteCollection(options *v1.DeleteOptions, listOpt
// Patch applies the patch and returns the patched instanceGroup.
func (c *FakeInstanceGroups) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.InstanceGroup, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(instancegroupsResource, c.ns, name, data, subresources...), &v1alpha1.InstanceGroup{})
Invokes(testing.NewPatchSubresourceAction(instancegroupsResource, c.ns, name, pt, data, subresources...), &v1alpha1.InstanceGroup{})
if obj == nil {
return nil, err

View File

@ -119,7 +119,7 @@ func (c *FakeSSHCredentials) DeleteCollection(options *v1.DeleteOptions, listOpt
// Patch applies the patch and returns the patched sSHCredential.
func (c *FakeSSHCredentials) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.SSHCredential, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(sshcredentialsResource, c.ns, name, data, subresources...), &v1alpha1.SSHCredential{})
Invokes(testing.NewPatchSubresourceAction(sshcredentialsResource, c.ns, name, pt, data, subresources...), &v1alpha1.SSHCredential{})
if obj == nil {
return nil, err

View File

@ -19,6 +19,8 @@ limitations under the License.
package v1alpha1
import (
"time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@ -75,11 +77,16 @@ func (c *instanceGroups) Get(name string, options v1.GetOptions) (result *v1alph
// List takes label and field selectors, and returns the list of InstanceGroups that match those selectors.
func (c *instanceGroups) List(opts v1.ListOptions) (result *v1alpha1.InstanceGroupList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.InstanceGroupList{}
err = c.client.Get().
Namespace(c.ns).
Resource("instancegroups").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
@ -87,11 +94,16 @@ func (c *instanceGroups) List(opts v1.ListOptions) (result *v1alpha1.InstanceGro
// Watch returns a watch.Interface that watches the requested instanceGroups.
func (c *instanceGroups) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("instancegroups").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
@ -133,10 +145,15 @@ func (c *instanceGroups) Delete(name string, options *v1.DeleteOptions) error {
// DeleteCollection deletes a collection of objects.
func (c *instanceGroups) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("instancegroups").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()

View File

@ -19,6 +19,8 @@ limitations under the License.
package v1alpha1
import (
"time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@ -75,11 +77,16 @@ func (c *sSHCredentials) Get(name string, options v1.GetOptions) (result *v1alph
// List takes label and field selectors, and returns the list of SSHCredentials that match those selectors.
func (c *sSHCredentials) List(opts v1.ListOptions) (result *v1alpha1.SSHCredentialList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.SSHCredentialList{}
err = c.client.Get().
Namespace(c.ns).
Resource("sshcredentials").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
@ -87,11 +94,16 @@ func (c *sSHCredentials) List(opts v1.ListOptions) (result *v1alpha1.SSHCredenti
// Watch returns a watch.Interface that watches the requested sSHCredentials.
func (c *sSHCredentials) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("sshcredentials").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
@ -133,10 +145,15 @@ func (c *sSHCredentials) Delete(name string, options *v1.DeleteOptions) error {
// DeleteCollection deletes a collection of objects.
func (c *sSHCredentials) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("sshcredentials").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()

View File

@ -19,6 +19,8 @@ limitations under the License.
package v1alpha2
import (
"time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@ -75,11 +77,16 @@ func (c *clusters) Get(name string, options v1.GetOptions) (result *v1alpha2.Clu
// List takes label and field selectors, and returns the list of Clusters that match those selectors.
func (c *clusters) List(opts v1.ListOptions) (result *v1alpha2.ClusterList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha2.ClusterList{}
err = c.client.Get().
Namespace(c.ns).
Resource("clusters").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
@ -87,11 +94,16 @@ func (c *clusters) List(opts v1.ListOptions) (result *v1alpha2.ClusterList, err
// Watch returns a watch.Interface that watches the requested clusters.
func (c *clusters) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("clusters").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
@ -133,10 +145,15 @@ func (c *clusters) Delete(name string, options *v1.DeleteOptions) error {
// DeleteCollection deletes a collection of objects.
func (c *clusters) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("clusters").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()

View File

@ -119,7 +119,7 @@ func (c *FakeClusters) DeleteCollection(options *v1.DeleteOptions, listOptions v
// Patch applies the patch and returns the patched cluster.
func (c *FakeClusters) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.Cluster, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(clustersResource, c.ns, name, data, subresources...), &v1alpha2.Cluster{})
Invokes(testing.NewPatchSubresourceAction(clustersResource, c.ns, name, pt, data, subresources...), &v1alpha2.Cluster{})
if obj == nil {
return nil, err

View File

@ -119,7 +119,7 @@ func (c *FakeInstanceGroups) DeleteCollection(options *v1.DeleteOptions, listOpt
// Patch applies the patch and returns the patched instanceGroup.
func (c *FakeInstanceGroups) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.InstanceGroup, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(instancegroupsResource, c.ns, name, data, subresources...), &v1alpha2.InstanceGroup{})
Invokes(testing.NewPatchSubresourceAction(instancegroupsResource, c.ns, name, pt, data, subresources...), &v1alpha2.InstanceGroup{})
if obj == nil {
return nil, err

View File

@ -119,7 +119,7 @@ func (c *FakeKeysets) DeleteCollection(options *v1.DeleteOptions, listOptions v1
// Patch applies the patch and returns the patched keyset.
func (c *FakeKeysets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.Keyset, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(keysetsResource, c.ns, name, data, subresources...), &v1alpha2.Keyset{})
Invokes(testing.NewPatchSubresourceAction(keysetsResource, c.ns, name, pt, data, subresources...), &v1alpha2.Keyset{})
if obj == nil {
return nil, err

View File

@ -119,7 +119,7 @@ func (c *FakeSSHCredentials) DeleteCollection(options *v1.DeleteOptions, listOpt
// Patch applies the patch and returns the patched sSHCredential.
func (c *FakeSSHCredentials) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.SSHCredential, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(sshcredentialsResource, c.ns, name, data, subresources...), &v1alpha2.SSHCredential{})
Invokes(testing.NewPatchSubresourceAction(sshcredentialsResource, c.ns, name, pt, data, subresources...), &v1alpha2.SSHCredential{})
if obj == nil {
return nil, err

View File

@ -19,6 +19,8 @@ limitations under the License.
package v1alpha2
import (
"time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@ -75,11 +77,16 @@ func (c *instanceGroups) Get(name string, options v1.GetOptions) (result *v1alph
// List takes label and field selectors, and returns the list of InstanceGroups that match those selectors.
func (c *instanceGroups) List(opts v1.ListOptions) (result *v1alpha2.InstanceGroupList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha2.InstanceGroupList{}
err = c.client.Get().
Namespace(c.ns).
Resource("instancegroups").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
@ -87,11 +94,16 @@ func (c *instanceGroups) List(opts v1.ListOptions) (result *v1alpha2.InstanceGro
// Watch returns a watch.Interface that watches the requested instanceGroups.
func (c *instanceGroups) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("instancegroups").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
@ -133,10 +145,15 @@ func (c *instanceGroups) Delete(name string, options *v1.DeleteOptions) error {
// DeleteCollection deletes a collection of objects.
func (c *instanceGroups) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("instancegroups").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()

View File

@ -19,6 +19,8 @@ limitations under the License.
package v1alpha2
import (
"time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@ -75,11 +77,16 @@ func (c *keysets) Get(name string, options v1.GetOptions) (result *v1alpha2.Keys
// List takes label and field selectors, and returns the list of Keysets that match those selectors.
func (c *keysets) List(opts v1.ListOptions) (result *v1alpha2.KeysetList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha2.KeysetList{}
err = c.client.Get().
Namespace(c.ns).
Resource("keysets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
@ -87,11 +94,16 @@ func (c *keysets) List(opts v1.ListOptions) (result *v1alpha2.KeysetList, err er
// Watch returns a watch.Interface that watches the requested keysets.
func (c *keysets) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("keysets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
@ -133,10 +145,15 @@ func (c *keysets) Delete(name string, options *v1.DeleteOptions) error {
// DeleteCollection deletes a collection of objects.
func (c *keysets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("keysets").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()

View File

@ -19,6 +19,8 @@ limitations under the License.
package v1alpha2
import (
"time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@ -75,11 +77,16 @@ func (c *sSHCredentials) Get(name string, options v1.GetOptions) (result *v1alph
// List takes label and field selectors, and returns the list of SSHCredentials that match those selectors.
func (c *sSHCredentials) List(opts v1.ListOptions) (result *v1alpha2.SSHCredentialList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha2.SSHCredentialList{}
err = c.client.Get().
Namespace(c.ns).
Resource("sshcredentials").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
@ -87,11 +94,16 @@ func (c *sSHCredentials) List(opts v1.ListOptions) (result *v1alpha2.SSHCredenti
// Watch returns a watch.Interface that watches the requested sSHCredentials.
func (c *sSHCredentials) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("sshcredentials").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
@ -133,10 +145,15 @@ func (c *sSHCredentials) Delete(name string, options *v1.DeleteOptions) error {
// DeleteCollection deletes a collection of objects.
func (c *sSHCredentials) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("sshcredentials").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()

View File

@ -19,6 +19,8 @@ limitations under the License.
package internalversion
import (
"time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@ -75,11 +77,16 @@ func (c *clusters) Get(name string, options v1.GetOptions) (result *kops.Cluster
// List takes label and field selectors, and returns the list of Clusters that match those selectors.
func (c *clusters) List(opts v1.ListOptions) (result *kops.ClusterList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &kops.ClusterList{}
err = c.client.Get().
Namespace(c.ns).
Resource("clusters").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
@ -87,11 +94,16 @@ func (c *clusters) List(opts v1.ListOptions) (result *kops.ClusterList, err erro
// Watch returns a watch.Interface that watches the requested clusters.
func (c *clusters) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("clusters").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
@ -133,10 +145,15 @@ func (c *clusters) Delete(name string, options *v1.DeleteOptions) error {
// DeleteCollection deletes a collection of objects.
func (c *clusters) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("clusters").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()

View File

@ -119,7 +119,7 @@ func (c *FakeClusters) DeleteCollection(options *v1.DeleteOptions, listOptions v
// Patch applies the patch and returns the patched cluster.
func (c *FakeClusters) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *kops.Cluster, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(clustersResource, c.ns, name, data, subresources...), &kops.Cluster{})
Invokes(testing.NewPatchSubresourceAction(clustersResource, c.ns, name, pt, data, subresources...), &kops.Cluster{})
if obj == nil {
return nil, err

View File

@ -119,7 +119,7 @@ func (c *FakeInstanceGroups) DeleteCollection(options *v1.DeleteOptions, listOpt
// Patch applies the patch and returns the patched instanceGroup.
func (c *FakeInstanceGroups) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *kops.InstanceGroup, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(instancegroupsResource, c.ns, name, data, subresources...), &kops.InstanceGroup{})
Invokes(testing.NewPatchSubresourceAction(instancegroupsResource, c.ns, name, pt, data, subresources...), &kops.InstanceGroup{})
if obj == nil {
return nil, err

View File

@ -119,7 +119,7 @@ func (c *FakeKeysets) DeleteCollection(options *v1.DeleteOptions, listOptions v1
// Patch applies the patch and returns the patched keyset.
func (c *FakeKeysets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *kops.Keyset, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(keysetsResource, c.ns, name, data, subresources...), &kops.Keyset{})
Invokes(testing.NewPatchSubresourceAction(keysetsResource, c.ns, name, pt, data, subresources...), &kops.Keyset{})
if obj == nil {
return nil, err

View File

@ -119,7 +119,7 @@ func (c *FakeSSHCredentials) DeleteCollection(options *v1.DeleteOptions, listOpt
// Patch applies the patch and returns the patched sSHCredential.
func (c *FakeSSHCredentials) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *kops.SSHCredential, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(sshcredentialsResource, c.ns, name, data, subresources...), &kops.SSHCredential{})
Invokes(testing.NewPatchSubresourceAction(sshcredentialsResource, c.ns, name, pt, data, subresources...), &kops.SSHCredential{})
if obj == nil {
return nil, err

View File

@ -19,6 +19,8 @@ limitations under the License.
package internalversion
import (
"time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@ -75,11 +77,16 @@ func (c *instanceGroups) Get(name string, options v1.GetOptions) (result *kops.I
// List takes label and field selectors, and returns the list of InstanceGroups that match those selectors.
func (c *instanceGroups) List(opts v1.ListOptions) (result *kops.InstanceGroupList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &kops.InstanceGroupList{}
err = c.client.Get().
Namespace(c.ns).
Resource("instancegroups").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
@ -87,11 +94,16 @@ func (c *instanceGroups) List(opts v1.ListOptions) (result *kops.InstanceGroupLi
// Watch returns a watch.Interface that watches the requested instanceGroups.
func (c *instanceGroups) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("instancegroups").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
@ -133,10 +145,15 @@ func (c *instanceGroups) Delete(name string, options *v1.DeleteOptions) error {
// DeleteCollection deletes a collection of objects.
func (c *instanceGroups) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("instancegroups").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()

View File

@ -19,6 +19,8 @@ limitations under the License.
package internalversion
import (
"time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@ -75,11 +77,16 @@ func (c *keysets) Get(name string, options v1.GetOptions) (result *kops.Keyset,
// List takes label and field selectors, and returns the list of Keysets that match those selectors.
func (c *keysets) List(opts v1.ListOptions) (result *kops.KeysetList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &kops.KeysetList{}
err = c.client.Get().
Namespace(c.ns).
Resource("keysets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
@ -87,11 +94,16 @@ func (c *keysets) List(opts v1.ListOptions) (result *kops.KeysetList, err error)
// Watch returns a watch.Interface that watches the requested keysets.
func (c *keysets) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("keysets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
@ -133,10 +145,15 @@ func (c *keysets) Delete(name string, options *v1.DeleteOptions) error {
// DeleteCollection deletes a collection of objects.
func (c *keysets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("keysets").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()

View File

@ -19,6 +19,8 @@ limitations under the License.
package internalversion
import (
"time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@ -75,11 +77,16 @@ func (c *sSHCredentials) Get(name string, options v1.GetOptions) (result *kops.S
// List takes label and field selectors, and returns the list of SSHCredentials that match those selectors.
func (c *sSHCredentials) List(opts v1.ListOptions) (result *kops.SSHCredentialList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &kops.SSHCredentialList{}
err = c.client.Get().
Namespace(c.ns).
Resource("sshcredentials").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
@ -87,11 +94,16 @@ func (c *sSHCredentials) List(opts v1.ListOptions) (result *kops.SSHCredentialLi
// Watch returns a watch.Interface that watches the requested sSHCredentials.
func (c *sSHCredentials) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("sshcredentials").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
@ -133,10 +145,15 @@ func (c *sSHCredentials) Delete(name string, options *v1.DeleteOptions) error {
// DeleteCollection deletes a collection of objects.
func (c *sSHCredentials) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("sshcredentials").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()

View File

@ -19,6 +19,8 @@ limitations under the License.
package v1alpha1
import (
"time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@ -75,11 +77,16 @@ func (c *clusters) Get(name string, options v1.GetOptions) (result *v1alpha1.Clu
// List takes label and field selectors, and returns the list of Clusters that match those selectors.
func (c *clusters) List(opts v1.ListOptions) (result *v1alpha1.ClusterList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.ClusterList{}
err = c.client.Get().
Namespace(c.ns).
Resource("clusters").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
@ -87,11 +94,16 @@ func (c *clusters) List(opts v1.ListOptions) (result *v1alpha1.ClusterList, err
// Watch returns a watch.Interface that watches the requested clusters.
func (c *clusters) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("clusters").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
@ -133,10 +145,15 @@ func (c *clusters) Delete(name string, options *v1.DeleteOptions) error {
// DeleteCollection deletes a collection of objects.
func (c *clusters) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("clusters").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()

View File

@ -119,7 +119,7 @@ func (c *FakeClusters) DeleteCollection(options *v1.DeleteOptions, listOptions v
// Patch applies the patch and returns the patched cluster.
func (c *FakeClusters) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Cluster, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(clustersResource, c.ns, name, data, subresources...), &v1alpha1.Cluster{})
Invokes(testing.NewPatchSubresourceAction(clustersResource, c.ns, name, pt, data, subresources...), &v1alpha1.Cluster{})
if obj == nil {
return nil, err

View File

@ -119,7 +119,7 @@ func (c *FakeInstanceGroups) DeleteCollection(options *v1.DeleteOptions, listOpt
// Patch applies the patch and returns the patched instanceGroup.
func (c *FakeInstanceGroups) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.InstanceGroup, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(instancegroupsResource, c.ns, name, data, subresources...), &v1alpha1.InstanceGroup{})
Invokes(testing.NewPatchSubresourceAction(instancegroupsResource, c.ns, name, pt, data, subresources...), &v1alpha1.InstanceGroup{})
if obj == nil {
return nil, err

View File

@ -119,7 +119,7 @@ func (c *FakeSSHCredentials) DeleteCollection(options *v1.DeleteOptions, listOpt
// Patch applies the patch and returns the patched sSHCredential.
func (c *FakeSSHCredentials) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.SSHCredential, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(sshcredentialsResource, c.ns, name, data, subresources...), &v1alpha1.SSHCredential{})
Invokes(testing.NewPatchSubresourceAction(sshcredentialsResource, c.ns, name, pt, data, subresources...), &v1alpha1.SSHCredential{})
if obj == nil {
return nil, err

View File

@ -19,6 +19,8 @@ limitations under the License.
package v1alpha1
import (
"time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@ -75,11 +77,16 @@ func (c *instanceGroups) Get(name string, options v1.GetOptions) (result *v1alph
// List takes label and field selectors, and returns the list of InstanceGroups that match those selectors.
func (c *instanceGroups) List(opts v1.ListOptions) (result *v1alpha1.InstanceGroupList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.InstanceGroupList{}
err = c.client.Get().
Namespace(c.ns).
Resource("instancegroups").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
@ -87,11 +94,16 @@ func (c *instanceGroups) List(opts v1.ListOptions) (result *v1alpha1.InstanceGro
// Watch returns a watch.Interface that watches the requested instanceGroups.
func (c *instanceGroups) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("instancegroups").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
@ -133,10 +145,15 @@ func (c *instanceGroups) Delete(name string, options *v1.DeleteOptions) error {
// DeleteCollection deletes a collection of objects.
func (c *instanceGroups) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("instancegroups").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()

View File

@ -19,6 +19,8 @@ limitations under the License.
package v1alpha1
import (
"time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@ -75,11 +77,16 @@ func (c *sSHCredentials) Get(name string, options v1.GetOptions) (result *v1alph
// List takes label and field selectors, and returns the list of SSHCredentials that match those selectors.
func (c *sSHCredentials) List(opts v1.ListOptions) (result *v1alpha1.SSHCredentialList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.SSHCredentialList{}
err = c.client.Get().
Namespace(c.ns).
Resource("sshcredentials").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
@ -87,11 +94,16 @@ func (c *sSHCredentials) List(opts v1.ListOptions) (result *v1alpha1.SSHCredenti
// Watch returns a watch.Interface that watches the requested sSHCredentials.
func (c *sSHCredentials) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("sshcredentials").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
@ -133,10 +145,15 @@ func (c *sSHCredentials) Delete(name string, options *v1.DeleteOptions) error {
// DeleteCollection deletes a collection of objects.
func (c *sSHCredentials) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("sshcredentials").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()

View File

@ -19,6 +19,8 @@ limitations under the License.
package v1alpha2
import (
"time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@ -75,11 +77,16 @@ func (c *clusters) Get(name string, options v1.GetOptions) (result *v1alpha2.Clu
// List takes label and field selectors, and returns the list of Clusters that match those selectors.
func (c *clusters) List(opts v1.ListOptions) (result *v1alpha2.ClusterList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha2.ClusterList{}
err = c.client.Get().
Namespace(c.ns).
Resource("clusters").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
@ -87,11 +94,16 @@ func (c *clusters) List(opts v1.ListOptions) (result *v1alpha2.ClusterList, err
// Watch returns a watch.Interface that watches the requested clusters.
func (c *clusters) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("clusters").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
@ -133,10 +145,15 @@ func (c *clusters) Delete(name string, options *v1.DeleteOptions) error {
// DeleteCollection deletes a collection of objects.
func (c *clusters) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("clusters").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()

View File

@ -119,7 +119,7 @@ func (c *FakeClusters) DeleteCollection(options *v1.DeleteOptions, listOptions v
// Patch applies the patch and returns the patched cluster.
func (c *FakeClusters) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.Cluster, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(clustersResource, c.ns, name, data, subresources...), &v1alpha2.Cluster{})
Invokes(testing.NewPatchSubresourceAction(clustersResource, c.ns, name, pt, data, subresources...), &v1alpha2.Cluster{})
if obj == nil {
return nil, err

View File

@ -119,7 +119,7 @@ func (c *FakeInstanceGroups) DeleteCollection(options *v1.DeleteOptions, listOpt
// Patch applies the patch and returns the patched instanceGroup.
func (c *FakeInstanceGroups) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.InstanceGroup, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(instancegroupsResource, c.ns, name, data, subresources...), &v1alpha2.InstanceGroup{})
Invokes(testing.NewPatchSubresourceAction(instancegroupsResource, c.ns, name, pt, data, subresources...), &v1alpha2.InstanceGroup{})
if obj == nil {
return nil, err

View File

@ -119,7 +119,7 @@ func (c *FakeKeysets) DeleteCollection(options *v1.DeleteOptions, listOptions v1
// Patch applies the patch and returns the patched keyset.
func (c *FakeKeysets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.Keyset, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(keysetsResource, c.ns, name, data, subresources...), &v1alpha2.Keyset{})
Invokes(testing.NewPatchSubresourceAction(keysetsResource, c.ns, name, pt, data, subresources...), &v1alpha2.Keyset{})
if obj == nil {
return nil, err

View File

@ -119,7 +119,7 @@ func (c *FakeSSHCredentials) DeleteCollection(options *v1.DeleteOptions, listOpt
// Patch applies the patch and returns the patched sSHCredential.
func (c *FakeSSHCredentials) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.SSHCredential, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(sshcredentialsResource, c.ns, name, data, subresources...), &v1alpha2.SSHCredential{})
Invokes(testing.NewPatchSubresourceAction(sshcredentialsResource, c.ns, name, pt, data, subresources...), &v1alpha2.SSHCredential{})
if obj == nil {
return nil, err

View File

@ -19,6 +19,8 @@ limitations under the License.
package v1alpha2
import (
"time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@ -75,11 +77,16 @@ func (c *instanceGroups) Get(name string, options v1.GetOptions) (result *v1alph
// List takes label and field selectors, and returns the list of InstanceGroups that match those selectors.
func (c *instanceGroups) List(opts v1.ListOptions) (result *v1alpha2.InstanceGroupList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha2.InstanceGroupList{}
err = c.client.Get().
Namespace(c.ns).
Resource("instancegroups").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
@ -87,11 +94,16 @@ func (c *instanceGroups) List(opts v1.ListOptions) (result *v1alpha2.InstanceGro
// Watch returns a watch.Interface that watches the requested instanceGroups.
func (c *instanceGroups) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("instancegroups").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
@ -133,10 +145,15 @@ func (c *instanceGroups) Delete(name string, options *v1.DeleteOptions) error {
// DeleteCollection deletes a collection of objects.
func (c *instanceGroups) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("instancegroups").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()

View File

@ -19,6 +19,8 @@ limitations under the License.
package v1alpha2
import (
"time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@ -75,11 +77,16 @@ func (c *keysets) Get(name string, options v1.GetOptions) (result *v1alpha2.Keys
// List takes label and field selectors, and returns the list of Keysets that match those selectors.
func (c *keysets) List(opts v1.ListOptions) (result *v1alpha2.KeysetList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha2.KeysetList{}
err = c.client.Get().
Namespace(c.ns).
Resource("keysets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
@ -87,11 +94,16 @@ func (c *keysets) List(opts v1.ListOptions) (result *v1alpha2.KeysetList, err er
// Watch returns a watch.Interface that watches the requested keysets.
func (c *keysets) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("keysets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
@ -133,10 +145,15 @@ func (c *keysets) Delete(name string, options *v1.DeleteOptions) error {
// DeleteCollection deletes a collection of objects.
func (c *keysets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("keysets").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()

View File

@ -19,6 +19,8 @@ limitations under the License.
package v1alpha2
import (
"time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@ -75,11 +77,16 @@ func (c *sSHCredentials) Get(name string, options v1.GetOptions) (result *v1alph
// List takes label and field selectors, and returns the list of SSHCredentials that match those selectors.
func (c *sSHCredentials) List(opts v1.ListOptions) (result *v1alpha2.SSHCredentialList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha2.SSHCredentialList{}
err = c.client.Get().
Namespace(c.ns).
Resource("sshcredentials").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do().
Into(result)
return
@ -87,11 +94,16 @@ func (c *sSHCredentials) List(opts v1.ListOptions) (result *v1alpha2.SSHCredenti
// Watch returns a watch.Interface that watches the requested sSHCredentials.
func (c *sSHCredentials) Watch(opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("sshcredentials").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch()
}
@ -133,10 +145,15 @@ func (c *sSHCredentials) Delete(name string, options *v1.DeleteOptions) error {
// DeleteCollection deletes a collection of objects.
func (c *sSHCredentials) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("sshcredentials").
VersionedParams(&listOptions, scheme.ParameterCodec).
Timeout(timeout).
Body(options).
Do().
Error()

View File

@ -22,7 +22,7 @@ go_library(
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/cli-runtime/pkg/genericclioptions:go_default_library",
"//vendor/k8s.io/client-go/kubernetes:go_default_library",
"//vendor/k8s.io/kubernetes/pkg/kubectl/cmd:go_default_library",
"//vendor/k8s.io/kubernetes/pkg/kubectl/cmd/drain:go_default_library",
"//vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util:go_default_library",
],
)

View File

@ -33,7 +33,7 @@ import (
"k8s.io/kops/pkg/featureflag"
"k8s.io/kops/pkg/validation"
"k8s.io/kops/upup/pkg/fi"
"k8s.io/kubernetes/pkg/kubectl/cmd"
cmddrain "k8s.io/kubernetes/pkg/kubectl/cmd/drain"
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
)
@ -329,9 +329,9 @@ func (r *RollingUpdateInstanceGroup) DrainNode(u *cloudinstances.CloudInstanceGr
ErrOut: os.Stderr,
}
drain := cmd.NewCmdDrain(f, streams)
drain := cmddrain.NewCmdDrain(f, streams)
args := []string{u.Node.Name}
options := cmd.NewDrainOptions(f, streams)
options := cmddrain.NewDrainOptions(f, streams)
// Override some options
options.IgnoreDaemonsets = true

View File

@ -25,7 +25,7 @@ import (
"github.com/golang/glog"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/kubernetes/pkg/util/mount"
"k8s.io/kubernetes/pkg/util/nsenter"
"k8s.io/kubernetes/pkg/util/nsenter" // moves to k8s.io/utils/nsenter in 1.14
utilsexec "k8s.io/utils/exec"
)

View File

@ -21,6 +21,7 @@ go_library(
visibility = ["//visibility:public"],
deps = [
"//vendor/github.com/Azure/go-autorest/autorest/adal:go_default_library",
"//vendor/github.com/Azure/go-autorest/logger:go_default_library",
"//vendor/github.com/Azure/go-autorest/version:go_default_library",
],
)

View File

@ -19,10 +19,6 @@ import (
"net/url"
)
const (
activeDirectoryAPIVersion = "1.0"
)
// OAuthConfig represents the endpoints needed
// in OAuth operations
type OAuthConfig struct {
@ -46,11 +42,25 @@ func validateStringParam(param, name string) error {
// NewOAuthConfig returns an OAuthConfig with tenant specific urls
func NewOAuthConfig(activeDirectoryEndpoint, tenantID string) (*OAuthConfig, error) {
apiVer := "1.0"
return NewOAuthConfigWithAPIVersion(activeDirectoryEndpoint, tenantID, &apiVer)
}
// NewOAuthConfigWithAPIVersion returns an OAuthConfig with tenant specific urls.
// If apiVersion is not nil the "api-version" query parameter will be appended to the endpoint URLs with the specified value.
func NewOAuthConfigWithAPIVersion(activeDirectoryEndpoint, tenantID string, apiVersion *string) (*OAuthConfig, error) {
if err := validateStringParam(activeDirectoryEndpoint, "activeDirectoryEndpoint"); err != nil {
return nil, err
}
api := ""
// it's legal for tenantID to be empty so don't validate it
const activeDirectoryEndpointTemplate = "%s/oauth2/%s?api-version=%s"
if apiVersion != nil {
if err := validateStringParam(*apiVersion, "apiVersion"); err != nil {
return nil, err
}
api = fmt.Sprintf("?api-version=%s", *apiVersion)
}
const activeDirectoryEndpointTemplate = "%s/oauth2/%s%s"
u, err := url.Parse(activeDirectoryEndpoint)
if err != nil {
return nil, err
@ -59,15 +69,15 @@ func NewOAuthConfig(activeDirectoryEndpoint, tenantID string) (*OAuthConfig, err
if err != nil {
return nil, err
}
authorizeURL, err := u.Parse(fmt.Sprintf(activeDirectoryEndpointTemplate, tenantID, "authorize", activeDirectoryAPIVersion))
authorizeURL, err := u.Parse(fmt.Sprintf(activeDirectoryEndpointTemplate, tenantID, "authorize", api))
if err != nil {
return nil, err
}
tokenURL, err := u.Parse(fmt.Sprintf(activeDirectoryEndpointTemplate, tenantID, "token", activeDirectoryAPIVersion))
tokenURL, err := u.Parse(fmt.Sprintf(activeDirectoryEndpointTemplate, tenantID, "token", api))
if err != nil {
return nil, err
}
deviceCodeURL, err := u.Parse(fmt.Sprintf(activeDirectoryEndpointTemplate, tenantID, "devicecode", activeDirectoryAPIVersion))
deviceCodeURL, err := u.Parse(fmt.Sprintf(activeDirectoryEndpointTemplate, tenantID, "devicecode", api))
if err != nil {
return nil, err
}

View File

@ -38,7 +38,7 @@ func (sf SenderFunc) Do(r *http.Request) (*http.Response, error) {
return sf(r)
}
// SendDecorator takes and possibily decorates, by wrapping, a Sender. Decorators may affect the
// SendDecorator takes and possibly decorates, by wrapping, a Sender. Decorators may affect the
// http.Request and pass it along or, first, pass the http.Request along then react to the
// http.Response result.
type SendDecorator func(Sender) Sender

View File

@ -29,7 +29,6 @@ import (
"net"
"net/http"
"net/url"
"strconv"
"strings"
"sync"
"time"
@ -97,18 +96,27 @@ type RefresherWithContext interface {
type TokenRefreshCallback func(Token) error
// Token encapsulates the access token used to authorize Azure requests.
// https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-oauth2-client-creds-grant-flow#service-to-service-access-token-response
type Token struct {
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token"`
ExpiresIn string `json:"expires_in"`
ExpiresOn string `json:"expires_on"`
NotBefore string `json:"not_before"`
ExpiresIn json.Number `json:"expires_in"`
ExpiresOn json.Number `json:"expires_on"`
NotBefore json.Number `json:"not_before"`
Resource string `json:"resource"`
Type string `json:"token_type"`
}
func newToken() Token {
return Token{
ExpiresIn: "0",
ExpiresOn: "0",
NotBefore: "0",
}
}
// IsZero returns true if the token object is zero-initialized.
func (t Token) IsZero() bool {
return t == Token{}
@ -116,12 +124,12 @@ func (t Token) IsZero() bool {
// Expires returns the time.Time when the Token expires.
func (t Token) Expires() time.Time {
s, err := strconv.Atoi(t.ExpiresOn)
s, err := t.ExpiresOn.Float64()
if err != nil {
s = -3600
}
expiration := date.NewUnixTimeFromSeconds(float64(s))
expiration := date.NewUnixTimeFromSeconds(s)
return time.Time(expiration).UTC()
}
@ -218,6 +226,8 @@ func (secret *ServicePrincipalCertificateSecret) SignJwt(spt *ServicePrincipalTo
token := jwt.New(jwt.SigningMethodRS256)
token.Header["x5t"] = thumbprint
x5c := []string{base64.StdEncoding.EncodeToString(secret.Certificate.Raw)}
token.Header["x5c"] = x5c
token.Claims = jwt.MapClaims{
"aud": spt.inner.OauthConfig.TokenEndpoint.String(),
"iss": spt.inner.ClientID,
@ -414,6 +424,7 @@ func NewServicePrincipalTokenWithSecret(oauthConfig OAuthConfig, id string, reso
}
spt := &ServicePrincipalToken{
inner: servicePrincipalToken{
Token: newToken(),
OauthConfig: oauthConfig,
Secret: secret,
ClientID: id,
@ -653,6 +664,7 @@ func newServicePrincipalTokenFromMSI(msiEndpoint, resource string, userAssignedI
spt := &ServicePrincipalToken{
inner: servicePrincipalToken{
Token: newToken(),
OauthConfig: OAuthConfig{
TokenEndpoint: *msiEndpointURL,
},

View File

@ -119,7 +119,10 @@ func (f *Future) Done(sender autorest.Sender) (bool, error) {
if err := f.pt.updatePollingState(f.pt.provisioningStateApplicable()); err != nil {
return false, err
}
if err := f.pt.updateHeaders(); err != nil {
if err := f.pt.initPollingMethod(); err != nil {
return false, err
}
if err := f.pt.updatePollingMethod(); err != nil {
return false, err
}
return f.pt.hasTerminated(), f.pt.pollingError()
@ -165,8 +168,12 @@ func (f Future) WaitForCompletion(ctx context.Context, client autorest.Client) e
// polling duration has been exceeded. It will retry failed polling attempts based on
// the retry value defined in the client up to the maximum retry attempts.
func (f *Future) WaitForCompletionRef(ctx context.Context, client autorest.Client) error {
ctx, cancel := context.WithTimeout(ctx, client.PollingDuration)
defer cancel()
if d := client.PollingDuration; d != 0 {
var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, d)
defer cancel()
}
done, err := f.Done(client)
for attempts := 0; !done; done, err = f.Done(client) {
if attempts >= client.RetryAttempts {
@ -264,7 +271,7 @@ type pollingTracker interface {
// these methods can differ per tracker
// checks the response headers and status code to determine the polling mechanism
updateHeaders() error
updatePollingMethod() error
// checks the response for tracker-specific error conditions
checkForErrors() error
@ -274,6 +281,10 @@ type pollingTracker interface {
// methods common to all trackers
// initializes a tracker's polling URL and method, called for each iteration.
// these values can be overridden by each polling tracker as required.
initPollingMethod() error
// initializes the tracker's internal state, call this when the tracker is created
initializeState() error
@ -348,6 +359,10 @@ func (pt *pollingTrackerBase) initializeState() error {
case http.StatusOK:
if ps := pt.getProvisioningState(); ps != nil {
pt.State = *ps
if pt.hasFailed() {
pt.updateErrorFromResponse()
return pt.pollingError()
}
} else {
pt.State = operationSucceeded
}
@ -364,8 +379,9 @@ func (pt *pollingTrackerBase) initializeState() error {
default:
pt.State = operationFailed
pt.updateErrorFromResponse()
return pt.pollingError()
}
return nil
return pt.initPollingMethod()
}
func (pt pollingTrackerBase) getProvisioningState() *string {
@ -416,12 +432,14 @@ func (pt *pollingTrackerBase) pollForStatus(sender autorest.Sender) error {
} else {
// check response body for error content
pt.updateErrorFromResponse()
err = pt.pollingError()
}
return err
}
// attempts to unmarshal a ServiceError type from the response body.
// if that fails then make a best attempt at creating something meaningful.
// NOTE: this assumes that the async operation has failed.
func (pt *pollingTrackerBase) updateErrorFromResponse() {
var err error
if pt.resp.ContentLength != 0 {
@ -431,8 +449,7 @@ func (pt *pollingTrackerBase) updateErrorFromResponse() {
re := respErr{}
defer pt.resp.Body.Close()
var b []byte
b, err = ioutil.ReadAll(pt.resp.Body)
if err != nil {
if b, err = ioutil.ReadAll(pt.resp.Body); err != nil {
goto Default
}
if err = json.Unmarshal(b, &re); err != nil {
@ -445,20 +462,29 @@ func (pt *pollingTrackerBase) updateErrorFromResponse() {
goto Default
}
}
if re.ServiceError != nil {
// the unmarshaller will ensure re.ServiceError is non-nil
// even if there was no content unmarshalled so check the code.
if re.ServiceError.Code != "" {
pt.Err = re.ServiceError
return
}
}
Default:
se := &ServiceError{
Code: fmt.Sprintf("HTTP status code %v", pt.resp.StatusCode),
Message: pt.resp.Status,
Code: pt.pollingStatus(),
Message: "The async operation failed.",
}
if err != nil {
se.InnerError = make(map[string]interface{})
se.InnerError["unmarshalError"] = err.Error()
}
// stick the response body into the error object in hopes
// it contains something useful to help diagnose the failure.
if len(pt.rawBody) > 0 {
se.AdditionalInfo = []map[string]interface{}{
pt.rawBody,
}
}
pt.Err = se
}
@ -538,13 +564,33 @@ func (pt pollingTrackerBase) baseCheckForErrors() error {
return nil
}
// default initialization of polling URL/method. each verb tracker will update this as required.
func (pt *pollingTrackerBase) initPollingMethod() error {
if ao, err := getURLFromAsyncOpHeader(pt.resp); err != nil {
return err
} else if ao != "" {
pt.URI = ao
pt.Pm = PollingAsyncOperation
return nil
}
if lh, err := getURLFromLocationHeader(pt.resp); err != nil {
return err
} else if lh != "" {
pt.URI = lh
pt.Pm = PollingLocation
return nil
}
// it's ok if we didn't find a polling header, this will be handled elsewhere
return nil
}
// DELETE
type pollingTrackerDelete struct {
pollingTrackerBase
}
func (pt *pollingTrackerDelete) updateHeaders() error {
func (pt *pollingTrackerDelete) updatePollingMethod() error {
// for 201 the Location header is required
if pt.resp.StatusCode == http.StatusCreated {
if lh, err := getURLFromLocationHeader(pt.resp); err != nil {
@ -600,7 +646,7 @@ type pollingTrackerPatch struct {
pollingTrackerBase
}
func (pt *pollingTrackerPatch) updateHeaders() error {
func (pt *pollingTrackerPatch) updatePollingMethod() error {
// by default we can use the original URL for polling and final GET
if pt.URI == "" {
pt.URI = pt.resp.Request.URL.String()
@ -658,7 +704,7 @@ type pollingTrackerPost struct {
pollingTrackerBase
}
func (pt *pollingTrackerPost) updateHeaders() error {
func (pt *pollingTrackerPost) updatePollingMethod() error {
// 201 requires Location header
if pt.resp.StatusCode == http.StatusCreated {
if lh, err := getURLFromLocationHeader(pt.resp); err != nil {
@ -714,7 +760,7 @@ type pollingTrackerPut struct {
pollingTrackerBase
}
func (pt *pollingTrackerPut) updateHeaders() error {
func (pt *pollingTrackerPut) updatePollingMethod() error {
// by default we can use the original URL for polling and final GET
if pt.URI == "" {
pt.URI = pt.resp.Request.URL.String()
@ -808,7 +854,7 @@ func createPollingTracker(resp *http.Response) (pollingTracker, error) {
// this initializes the polling header values, we do this during creation in case the
// initial response send us invalid values; this way the API call will return a non-nil
// error (not doing this means the error shows up in Future.Done)
return pt, pt.updateHeaders()
return pt, pt.updatePollingMethod()
}
// gets the polling URL from the Azure-AsyncOperation header.

View File

@ -140,8 +140,8 @@ func register(client autorest.Client, originalReq *http.Request, re RequestError
}
// poll for registered provisioning state
now := time.Now()
for err == nil && time.Since(now) < client.PollingDuration {
registrationStartTime := time.Now()
for err == nil && (client.PollingDuration == 0 || (client.PollingDuration != 0 && time.Since(registrationStartTime) < client.PollingDuration)) {
// taken from the resources SDK
// https://github.com/Azure/azure-sdk-for-go/blob/9f366792afa3e0ddaecdc860e793ba9d75e76c27/arm/resources/resources/providers.go#L45
preparer := autorest.CreatePreparer(
@ -183,7 +183,7 @@ func register(client autorest.Client, originalReq *http.Request, re RequestError
return originalReq.Context().Err()
}
}
if !(time.Since(now) < client.PollingDuration) {
if client.PollingDuration != 0 && !(time.Since(registrationStartTime) < client.PollingDuration) {
return errors.New("polling for resource provider registration has exceeded the polling duration")
}
return err

Some files were not shown because too many files have changed in this diff Show More