Merge branch 'master' into fix_scripts_branch
This commit is contained in:
180
CHANGELOG-1.7.md
180
CHANGELOG-1.7.md
@@ -1,65 +1,72 @@
|
||||
<!-- BEGIN MUNGE: GENERATED_TOC -->
|
||||
- [v1.7.8](#v178)
|
||||
- [Downloads for v1.7.8](#downloads-for-v178)
|
||||
- [v1.7.9](#v179)
|
||||
- [Downloads for v1.7.9](#downloads-for-v179)
|
||||
- [Client Binaries](#client-binaries)
|
||||
- [Server Binaries](#server-binaries)
|
||||
- [Node Binaries](#node-binaries)
|
||||
- [Changelog since v1.7.7](#changelog-since-v177)
|
||||
- [Changelog since v1.7.8](#changelog-since-v178)
|
||||
- [Other notable changes](#other-notable-changes)
|
||||
- [v1.7.7](#v177)
|
||||
- [Downloads for v1.7.7](#downloads-for-v177)
|
||||
- [v1.7.8](#v178)
|
||||
- [Downloads for v1.7.8](#downloads-for-v178)
|
||||
- [Client Binaries](#client-binaries-1)
|
||||
- [Server Binaries](#server-binaries-1)
|
||||
- [Node Binaries](#node-binaries-1)
|
||||
- [Changelog since v1.7.6](#changelog-since-v176)
|
||||
- [Changelog since v1.7.7](#changelog-since-v177)
|
||||
- [Other notable changes](#other-notable-changes-1)
|
||||
- [v1.7.6](#v176)
|
||||
- [Downloads for v1.7.6](#downloads-for-v176)
|
||||
- [v1.7.7](#v177)
|
||||
- [Downloads for v1.7.7](#downloads-for-v177)
|
||||
- [Client Binaries](#client-binaries-2)
|
||||
- [Server Binaries](#server-binaries-2)
|
||||
- [Node Binaries](#node-binaries-2)
|
||||
- [Changelog since v1.7.5](#changelog-since-v175)
|
||||
- [Changelog since v1.7.6](#changelog-since-v176)
|
||||
- [Other notable changes](#other-notable-changes-2)
|
||||
- [v1.7.5](#v175)
|
||||
- [Downloads for v1.7.5](#downloads-for-v175)
|
||||
- [v1.7.6](#v176)
|
||||
- [Downloads for v1.7.6](#downloads-for-v176)
|
||||
- [Client Binaries](#client-binaries-3)
|
||||
- [Server Binaries](#server-binaries-3)
|
||||
- [Node Binaries](#node-binaries-3)
|
||||
- [Changelog since v1.7.4](#changelog-since-v174)
|
||||
- [Changelog since v1.7.5](#changelog-since-v175)
|
||||
- [Other notable changes](#other-notable-changes-3)
|
||||
- [v1.7.4](#v174)
|
||||
- [Downloads for v1.7.4](#downloads-for-v174)
|
||||
- [v1.7.5](#v175)
|
||||
- [Downloads for v1.7.5](#downloads-for-v175)
|
||||
- [Client Binaries](#client-binaries-4)
|
||||
- [Server Binaries](#server-binaries-4)
|
||||
- [Node Binaries](#node-binaries-4)
|
||||
- [Changelog since v1.7.3](#changelog-since-v173)
|
||||
- [Changelog since v1.7.4](#changelog-since-v174)
|
||||
- [Other notable changes](#other-notable-changes-4)
|
||||
- [v1.7.3](#v173)
|
||||
- [Downloads for v1.7.3](#downloads-for-v173)
|
||||
- [v1.7.4](#v174)
|
||||
- [Downloads for v1.7.4](#downloads-for-v174)
|
||||
- [Client Binaries](#client-binaries-5)
|
||||
- [Server Binaries](#server-binaries-5)
|
||||
- [Node Binaries](#node-binaries-5)
|
||||
- [Changelog since v1.7.2](#changelog-since-v172)
|
||||
- [Changelog since v1.7.3](#changelog-since-v173)
|
||||
- [Other notable changes](#other-notable-changes-5)
|
||||
- [v1.7.2](#v172)
|
||||
- [Downloads for v1.7.2](#downloads-for-v172)
|
||||
- [v1.7.3](#v173)
|
||||
- [Downloads for v1.7.3](#downloads-for-v173)
|
||||
- [Client Binaries](#client-binaries-6)
|
||||
- [Server Binaries](#server-binaries-6)
|
||||
- [Node Binaries](#node-binaries-6)
|
||||
- [Changelog since v1.7.1](#changelog-since-v171)
|
||||
- [Changelog since v1.7.2](#changelog-since-v172)
|
||||
- [Other notable changes](#other-notable-changes-6)
|
||||
- [v1.7.1](#v171)
|
||||
- [Downloads for v1.7.1](#downloads-for-v171)
|
||||
- [v1.7.2](#v172)
|
||||
- [Downloads for v1.7.2](#downloads-for-v172)
|
||||
- [Client Binaries](#client-binaries-7)
|
||||
- [Server Binaries](#server-binaries-7)
|
||||
- [Node Binaries](#node-binaries-7)
|
||||
- [Changelog since v1.7.0](#changelog-since-v170)
|
||||
- [Changelog since v1.7.1](#changelog-since-v171)
|
||||
- [Other notable changes](#other-notable-changes-7)
|
||||
- [v1.7.0](#v170)
|
||||
- [Downloads for v1.7.0](#downloads-for-v170)
|
||||
- [v1.7.1](#v171)
|
||||
- [Downloads for v1.7.1](#downloads-for-v171)
|
||||
- [Client Binaries](#client-binaries-8)
|
||||
- [Server Binaries](#server-binaries-8)
|
||||
- [Node Binaries](#node-binaries-8)
|
||||
- [Changelog since v1.7.0](#changelog-since-v170)
|
||||
- [Other notable changes](#other-notable-changes-8)
|
||||
- [v1.7.0](#v170)
|
||||
- [Downloads for v1.7.0](#downloads-for-v170)
|
||||
- [Client Binaries](#client-binaries-9)
|
||||
- [Server Binaries](#server-binaries-9)
|
||||
- [Node Binaries](#node-binaries-9)
|
||||
- [**Major Themes**](#major-themes)
|
||||
- [**Action Required Before Upgrading**](#action-required-before-upgrading)
|
||||
- [Network](#network)
|
||||
@@ -115,7 +122,7 @@
|
||||
- [Local Storage](#local-storage)
|
||||
- [Volume Plugins](#volume-plugins)
|
||||
- [Metrics](#metrics)
|
||||
- [**Other notable changes**](#other-notable-changes-8)
|
||||
- [**Other notable changes**](#other-notable-changes-9)
|
||||
- [Admission plugin](#admission-plugin)
|
||||
- [API Machinery](#api-machinery-1)
|
||||
- [Application autoscaling](#application-autoscaling-1)
|
||||
@@ -143,62 +150,123 @@
|
||||
- [Previous Releases Included in v1.7.0](#previous-releases-included-in-v170)
|
||||
- [v1.7.0-rc.1](#v170-rc1)
|
||||
- [Downloads for v1.7.0-rc.1](#downloads-for-v170-rc1)
|
||||
- [Client Binaries](#client-binaries-9)
|
||||
- [Server Binaries](#server-binaries-9)
|
||||
- [Node Binaries](#node-binaries-9)
|
||||
- [Changelog since v1.7.0-beta.2](#changelog-since-v170-beta2)
|
||||
- [Action Required](#action-required)
|
||||
- [Other notable changes](#other-notable-changes-9)
|
||||
- [v1.7.0-beta.2](#v170-beta2)
|
||||
- [Downloads for v1.7.0-beta.2](#downloads-for-v170-beta2)
|
||||
- [Client Binaries](#client-binaries-10)
|
||||
- [Server Binaries](#server-binaries-10)
|
||||
- [Node Binaries](#node-binaries-10)
|
||||
- [Changelog since v1.7.0-beta.1](#changelog-since-v170-beta1)
|
||||
- [Action Required](#action-required-1)
|
||||
- [Changelog since v1.7.0-beta.2](#changelog-since-v170-beta2)
|
||||
- [Action Required](#action-required)
|
||||
- [Other notable changes](#other-notable-changes-10)
|
||||
- [v1.7.0-beta.1](#v170-beta1)
|
||||
- [Downloads for v1.7.0-beta.1](#downloads-for-v170-beta1)
|
||||
- [v1.7.0-beta.2](#v170-beta2)
|
||||
- [Downloads for v1.7.0-beta.2](#downloads-for-v170-beta2)
|
||||
- [Client Binaries](#client-binaries-11)
|
||||
- [Server Binaries](#server-binaries-11)
|
||||
- [Node Binaries](#node-binaries-11)
|
||||
- [Changelog since v1.7.0-alpha.4](#changelog-since-v170-alpha4)
|
||||
- [Action Required](#action-required-2)
|
||||
- [Changelog since v1.7.0-beta.1](#changelog-since-v170-beta1)
|
||||
- [Action Required](#action-required-1)
|
||||
- [Other notable changes](#other-notable-changes-11)
|
||||
- [v1.7.0-alpha.4](#v170-alpha4)
|
||||
- [Downloads for v1.7.0-alpha.4](#downloads-for-v170-alpha4)
|
||||
- [v1.7.0-beta.1](#v170-beta1)
|
||||
- [Downloads for v1.7.0-beta.1](#downloads-for-v170-beta1)
|
||||
- [Client Binaries](#client-binaries-12)
|
||||
- [Server Binaries](#server-binaries-12)
|
||||
- [Node Binaries](#node-binaries-12)
|
||||
- [Changelog since v1.7.0-alpha.3](#changelog-since-v170-alpha3)
|
||||
- [Action Required](#action-required-3)
|
||||
- [Changelog since v1.7.0-alpha.4](#changelog-since-v170-alpha4)
|
||||
- [Action Required](#action-required-2)
|
||||
- [Other notable changes](#other-notable-changes-12)
|
||||
- [v1.7.0-alpha.3](#v170-alpha3)
|
||||
- [Downloads for v1.7.0-alpha.3](#downloads-for-v170-alpha3)
|
||||
- [v1.7.0-alpha.4](#v170-alpha4)
|
||||
- [Downloads for v1.7.0-alpha.4](#downloads-for-v170-alpha4)
|
||||
- [Client Binaries](#client-binaries-13)
|
||||
- [Server Binaries](#server-binaries-13)
|
||||
- [Node Binaries](#node-binaries-13)
|
||||
- [Changelog since v1.7.0-alpha.2](#changelog-since-v170-alpha2)
|
||||
- [Action Required](#action-required-4)
|
||||
- [Changelog since v1.7.0-alpha.3](#changelog-since-v170-alpha3)
|
||||
- [Action Required](#action-required-3)
|
||||
- [Other notable changes](#other-notable-changes-13)
|
||||
- [v1.7.0-alpha.2](#v170-alpha2)
|
||||
- [Downloads for v1.7.0-alpha.2](#downloads-for-v170-alpha2)
|
||||
- [v1.7.0-alpha.3](#v170-alpha3)
|
||||
- [Downloads for v1.7.0-alpha.3](#downloads-for-v170-alpha3)
|
||||
- [Client Binaries](#client-binaries-14)
|
||||
- [Server Binaries](#server-binaries-14)
|
||||
- [Changelog since v1.7.0-alpha.1](#changelog-since-v170-alpha1)
|
||||
- [Action Required](#action-required-5)
|
||||
- [Node Binaries](#node-binaries-14)
|
||||
- [Changelog since v1.7.0-alpha.2](#changelog-since-v170-alpha2)
|
||||
- [Action Required](#action-required-4)
|
||||
- [Other notable changes](#other-notable-changes-14)
|
||||
- [v1.7.0-alpha.1](#v170-alpha1)
|
||||
- [Downloads for v1.7.0-alpha.1](#downloads-for-v170-alpha1)
|
||||
- [v1.7.0-alpha.2](#v170-alpha2)
|
||||
- [Downloads for v1.7.0-alpha.2](#downloads-for-v170-alpha2)
|
||||
- [Client Binaries](#client-binaries-15)
|
||||
- [Server Binaries](#server-binaries-15)
|
||||
- [Changelog since v1.6.0](#changelog-since-v160)
|
||||
- [Changelog since v1.7.0-alpha.1](#changelog-since-v170-alpha1)
|
||||
- [Action Required](#action-required-5)
|
||||
- [Other notable changes](#other-notable-changes-15)
|
||||
- [v1.7.0-alpha.1](#v170-alpha1)
|
||||
- [Downloads for v1.7.0-alpha.1](#downloads-for-v170-alpha1)
|
||||
- [Client Binaries](#client-binaries-16)
|
||||
- [Server Binaries](#server-binaries-16)
|
||||
- [Changelog since v1.6.0](#changelog-since-v160)
|
||||
- [Other notable changes](#other-notable-changes-16)
|
||||
<!-- END MUNGE: GENERATED_TOC -->
|
||||
|
||||
<!-- NEW RELEASE NOTES ENTRY -->
|
||||
|
||||
|
||||
# v1.7.9
|
||||
|
||||
[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.7/examples)
|
||||
|
||||
## Downloads for v1.7.9
|
||||
|
||||
|
||||
filename | sha256 hash
|
||||
-------- | -----------
|
||||
[kubernetes.tar.gz](https://dl.k8s.io/v1.7.9/kubernetes.tar.gz) | `8c7c16c137c421cfe27311aba0fea49411ed725d3d41938706474c328647afcc`
|
||||
[kubernetes-src.tar.gz](https://dl.k8s.io/v1.7.9/kubernetes-src.tar.gz) | `eb2d967731d20b2f42787400fd9114ebd40c2722f3afd7ebb232324d2e66815e`
|
||||
|
||||
### Client Binaries
|
||||
|
||||
filename | sha256 hash
|
||||
-------- | -----------
|
||||
[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.7.9/kubernetes-client-darwin-386.tar.gz) | `930e24595a8cf87f65d0cbee6f033f8c441a64da86cdc22ad9d31cd5e0496928`
|
||||
[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.7.9/kubernetes-client-darwin-amd64.tar.gz) | `59c10f48351347821216d1cb9726db0b31868cd5e059814a5154dfdeb36548e1`
|
||||
[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.7.9/kubernetes-client-linux-386.tar.gz) | `3a7e20a3d45eab69bd8a6c9572ecd98f50499b1880882c0e78c8cdd726046802`
|
||||
[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.9/kubernetes-client-linux-amd64.tar.gz) | `ac530a89b701669df889c7d5e34c7c5ba0b1c231e45fd9a1ff441d807d0fba8f`
|
||||
[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.9/kubernetes-client-linux-arm64.tar.gz) | `cdad0b14762b01aac8820e41cb89b850b1dc8d539ac892ca9f718d9e00e8505e`
|
||||
[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.7.9/kubernetes-client-linux-arm.tar.gz) | `11c1bb76f2fc7fa9038d1d8687df857a231bd8a44b00d3f3bfef277b44e1c604`
|
||||
[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.9/kubernetes-client-linux-ppc64le.tar.gz) | `e7ed462fb6d86b1205ca9c4701b521d80b9c614fb98ca3a75579d18835303f7f`
|
||||
[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.9/kubernetes-client-linux-s390x.tar.gz) | `7aff3b2d0540c3efd53d383dc87d95b62b4203933bd154f66e167fffa5dd0d72`
|
||||
[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.7.9/kubernetes-client-windows-386.tar.gz) | `45f64fae0368f80bff7f11fafcce4ccc5c79876cb496481fbcdb35fd5aa85a49`
|
||||
[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.9/kubernetes-client-windows-amd64.tar.gz) | `f7c34d11b35424fe96e1477a9347618169b911d4ecc57f00945f63d5cef53968`
|
||||
|
||||
### Server Binaries
|
||||
|
||||
filename | sha256 hash
|
||||
-------- | -----------
|
||||
[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.9/kubernetes-server-linux-amd64.tar.gz) | `9b94e2b1c13dd3304aa36d0800f88a86d1c335a2b56de8a69d67f50c6f08d0ad`
|
||||
[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.9/kubernetes-server-linux-arm64.tar.gz) | `2c5cb85515137f58ddc475963cd42cd69a881b2269724e0c5237b365644974db`
|
||||
[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.7.9/kubernetes-server-linux-arm.tar.gz) | `e62d8e234bc31d8dd4c88b28261445f4bc00e9e19795c57f7e72da91c037b6cd`
|
||||
[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.9/kubernetes-server-linux-ppc64le.tar.gz) | `b59c47ff865c4f21da816500d1013e5bab71bcb2ed214ceb022395eb6d729634`
|
||||
[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.9/kubernetes-server-linux-s390x.tar.gz) | `2c057b4dcfd40457fb5ee7d692239b702b61c17a9cc095ecd2a65ac553e4d2d7`
|
||||
|
||||
### Node Binaries
|
||||
|
||||
filename | sha256 hash
|
||||
-------- | -----------
|
||||
[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.7.9/kubernetes-node-linux-amd64.tar.gz) | `e92e3deb34ce06b11b667027ddd9753f8c3149996320bb9dd3555d758775e60d`
|
||||
[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.7.9/kubernetes-node-linux-arm64.tar.gz) | `96bf63c7ba4a322ec21b22c3fa3f37c713aa846bdde311bc7a52df8abc7ef291`
|
||||
[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.7.9/kubernetes-node-linux-arm.tar.gz) | `4274d183d002c57cf6fff21ba71cdb69121f520ae77c913013adb92f7efee2a6`
|
||||
[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.7.9/kubernetes-node-linux-ppc64le.tar.gz) | `8c9a7ef4141dc59be1b613b461ca8e16612c5d36ca9cd1b9fbb92f35f02e63f1`
|
||||
[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.7.9/kubernetes-node-linux-s390x.tar.gz) | `14314c3c958bf4b966bc6960495271412019973834e9ca427bcedb1bd51c787f`
|
||||
[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.7.9/kubernetes-node-windows-amd64.tar.gz) | `a20e882b046f95ebb6c94f87aee99b27d43422ea5e09b48fa67aa4926b2edbfe`
|
||||
|
||||
## Changelog since v1.7.8
|
||||
|
||||
### Other notable changes
|
||||
|
||||
* Support German cloud for azure disk mount feature ([#50673](https://github.com/kubernetes/kubernetes/pull/50673), [@clement-buchart](https://github.com/clement-buchart))
|
||||
* BugFix: Exited containers are not Garbage Collected by the kubelet while the pod is running ([#53167](https://github.com/kubernetes/kubernetes/pull/53167), [@dashpole](https://github.com/dashpole))
|
||||
* Address a bug which allowed the horizontal pod autoscaler to allocate `desiredReplicas` > `maxReplicas` in certain instances. ([#53690](https://github.com/kubernetes/kubernetes/pull/53690), [@mattjmcnaughton](https://github.com/mattjmcnaughton))
|
||||
* Use separate client for leader election in scheduler to avoid starving leader election by regular scheduler operations. ([#53793](https://github.com/kubernetes/kubernetes/pull/53793), [@wojtek-t](https://github.com/wojtek-t))
|
||||
* fix azure disk mounter issue ([#52260](https://github.com/kubernetes/kubernetes/pull/52260), [@andyzhangx](https://github.com/andyzhangx))
|
||||
* GCE: Fix issue deleting internal load balancers when the firewall resource may not exist. ([#53450](https://github.com/kubernetes/kubernetes/pull/53450), [@nicksardo](https://github.com/nicksardo))
|
||||
* Fix compilation of k8s.io/apiextensions-apiserver ([#48036](https://github.com/kubernetes/kubernetes/pull/48036), [@hongchaodeng](https://github.com/hongchaodeng))
|
||||
|
||||
|
||||
# v1.7.8
|
||||
|
||||
[Documentation](https://docs.k8s.io) & [Examples](https://releases.k8s.io/release-1.7/examples)
|
||||
|
61
Godeps/Godeps.json
generated
61
Godeps/Godeps.json
generated
@@ -2932,73 +2932,78 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/grpc",
|
||||
"Comment": "v1.3.0",
|
||||
"Rev": "d2e1b51f33ff8c5e4a15560ff049d200e83726c5"
|
||||
"Comment": "v1.5.2",
|
||||
"Rev": "b3ddf786825de56a4178401b7e174ee332173b66"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/grpc/codes",
|
||||
"Comment": "v1.3.0",
|
||||
"Rev": "d2e1b51f33ff8c5e4a15560ff049d200e83726c5"
|
||||
"Comment": "v1.5.2",
|
||||
"Rev": "b3ddf786825de56a4178401b7e174ee332173b66"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/grpc/connectivity",
|
||||
"Comment": "v1.5.2",
|
||||
"Rev": "b3ddf786825de56a4178401b7e174ee332173b66"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/grpc/credentials",
|
||||
"Comment": "v1.3.0",
|
||||
"Rev": "d2e1b51f33ff8c5e4a15560ff049d200e83726c5"
|
||||
"Comment": "v1.5.2",
|
||||
"Rev": "b3ddf786825de56a4178401b7e174ee332173b66"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/grpc/grpclb/grpc_lb_v1",
|
||||
"Comment": "v1.3.0",
|
||||
"Rev": "d2e1b51f33ff8c5e4a15560ff049d200e83726c5"
|
||||
"Comment": "v1.5.2",
|
||||
"Rev": "b3ddf786825de56a4178401b7e174ee332173b66"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/grpc/grpclog",
|
||||
"Comment": "v1.3.0",
|
||||
"Rev": "d2e1b51f33ff8c5e4a15560ff049d200e83726c5"
|
||||
"Comment": "v1.5.2",
|
||||
"Rev": "b3ddf786825de56a4178401b7e174ee332173b66"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/grpc/internal",
|
||||
"Comment": "v1.3.0",
|
||||
"Rev": "d2e1b51f33ff8c5e4a15560ff049d200e83726c5"
|
||||
"Comment": "v1.5.2",
|
||||
"Rev": "b3ddf786825de56a4178401b7e174ee332173b66"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/grpc/keepalive",
|
||||
"Comment": "v1.3.0",
|
||||
"Rev": "d2e1b51f33ff8c5e4a15560ff049d200e83726c5"
|
||||
"Comment": "v1.5.2",
|
||||
"Rev": "b3ddf786825de56a4178401b7e174ee332173b66"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/grpc/metadata",
|
||||
"Comment": "v1.3.0",
|
||||
"Rev": "d2e1b51f33ff8c5e4a15560ff049d200e83726c5"
|
||||
"Comment": "v1.5.2",
|
||||
"Rev": "b3ddf786825de56a4178401b7e174ee332173b66"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/grpc/naming",
|
||||
"Comment": "v1.3.0",
|
||||
"Rev": "d2e1b51f33ff8c5e4a15560ff049d200e83726c5"
|
||||
"Comment": "v1.5.2",
|
||||
"Rev": "b3ddf786825de56a4178401b7e174ee332173b66"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/grpc/peer",
|
||||
"Comment": "v1.3.0",
|
||||
"Rev": "d2e1b51f33ff8c5e4a15560ff049d200e83726c5"
|
||||
"Comment": "v1.5.2",
|
||||
"Rev": "b3ddf786825de56a4178401b7e174ee332173b66"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/grpc/stats",
|
||||
"Comment": "v1.3.0",
|
||||
"Rev": "d2e1b51f33ff8c5e4a15560ff049d200e83726c5"
|
||||
"Comment": "v1.5.2",
|
||||
"Rev": "b3ddf786825de56a4178401b7e174ee332173b66"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/grpc/status",
|
||||
"Comment": "v1.3.0",
|
||||
"Rev": "d2e1b51f33ff8c5e4a15560ff049d200e83726c5"
|
||||
"Comment": "v1.5.2",
|
||||
"Rev": "b3ddf786825de56a4178401b7e174ee332173b66"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/grpc/tap",
|
||||
"Comment": "v1.3.0",
|
||||
"Rev": "d2e1b51f33ff8c5e4a15560ff049d200e83726c5"
|
||||
"Comment": "v1.5.2",
|
||||
"Rev": "b3ddf786825de56a4178401b7e174ee332173b66"
|
||||
},
|
||||
{
|
||||
"ImportPath": "google.golang.org/grpc/transport",
|
||||
"Comment": "v1.3.0",
|
||||
"Rev": "d2e1b51f33ff8c5e4a15560ff049d200e83726c5"
|
||||
"Comment": "v1.5.2",
|
||||
"Rev": "b3ddf786825de56a4178401b7e174ee332173b66"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gopkg.in/gcfg.v1",
|
||||
|
3374
Godeps/LICENSES
generated
3374
Godeps/LICENSES
generated
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@ This folder contains an [OpenAPI specification][openapi] for Kubernetes API.
|
||||
|
||||
## Vendor Extensions
|
||||
|
||||
Kuberntes extends OpenAPI using these extensions. Note the version that
|
||||
Kuberntes extends OpenAPI using these extensions. Note the version that
|
||||
extensions has been added.
|
||||
|
||||
### `x-kubernetes-group-version-kind`
|
||||
@@ -56,5 +56,5 @@ For example:
|
||||
|
||||
### `x-kubernetes-patch-strategy` and `x-kubernetes-patch-merge-key`
|
||||
|
||||
Some of the definitions may have these extensions. For more information about PatchStrategy and PatchMergeKey see
|
||||
[strategic-merge-patch] (https://github.com/kubernetes/community/blob/3a1e6d22f812751ee88eccf7c59101852de63d5b/contributors/devel/strategic-merge-patch.md).
|
||||
Some of the definitions may have these extensions. For more information about PatchStrategy and PatchMergeKey see
|
||||
[strategic-merge-patch] (https://github.com/kubernetes/community/blob/master/contributors/devel/strategic-merge-patch.md).
|
||||
|
@@ -62262,6 +62262,7 @@
|
||||
"description": "AdmissionHookClientConfig contains the information to make a TLS connection with the webhook",
|
||||
"required": [
|
||||
"service",
|
||||
"urlPath",
|
||||
"caBundle"
|
||||
],
|
||||
"properties": {
|
||||
@@ -62273,6 +62274,10 @@
|
||||
"service": {
|
||||
"description": "Service is a reference to the service for this webhook. If there is only one port open for the service, that port will be used. If there are multiple ports open, port 443 will be used if it is open, otherwise it is an error. Required",
|
||||
"$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ServiceReference"
|
||||
},
|
||||
"urlPath": {
|
||||
"description": "URLPath is an optional field that specifies the URL path to use when posting the AdmissionReview object.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@@ -1764,6 +1764,7 @@
|
||||
"description": "AdmissionHookClientConfig contains the information to make a TLS connection with the webhook",
|
||||
"required": [
|
||||
"service",
|
||||
"urlPath",
|
||||
"caBundle"
|
||||
],
|
||||
"properties": {
|
||||
@@ -1771,6 +1772,10 @@
|
||||
"$ref": "v1alpha1.ServiceReference",
|
||||
"description": "Service is a reference to the service for this webhook. If there is only one port open for the service, that port will be used. If there are multiple ports open, port 443 will be used if it is open, otherwise it is an error. Required"
|
||||
},
|
||||
"urlPath": {
|
||||
"type": "string",
|
||||
"description": "URLPath is an optional field that specifies the URL path to use when posting the AdmissionReview object."
|
||||
},
|
||||
"caBundle": {
|
||||
"type": "string",
|
||||
"description": "CABundle is a PEM encoded CA bundle which will be used to validate webhook's server certificate. Required"
|
||||
|
@@ -40,8 +40,7 @@ FLANNEL_DOWNLOAD_URL=\
|
||||
ETCD_DOWNLOAD_URL=\
|
||||
"https://github.com/coreos/etcd/releases/download/v${ETCD_VERSION}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz"
|
||||
|
||||
# TODO(#33726): switch to dl.k8s.io
|
||||
K8S_CLIENT_DOWNLOAD_URL=\
|
||||
"https://storage.googleapis.com/kubernetes-release/release/v${K8S_VERSION}/kubernetes-client-linux-amd64.tar.gz"
|
||||
"https://dl.k8s.io/v${K8S_VERSION}/kubernetes-client-linux-amd64.tar.gz"
|
||||
K8S_SERVER_DOWNLOAD_URL=\
|
||||
"https://storage.googleapis.com/kubernetes-release/release/v${K8S_VERSION}/kubernetes-server-linux-amd64.tar.gz"
|
||||
"https://dl.k8s.io/v${K8S_VERSION}/kubernetes-server-linux-amd64.tar.gz"
|
||||
|
@@ -250,6 +250,11 @@ if [[ -n "${GCE_ALPHA_FEATURES:-}" ]]; then
|
||||
PROVIDER_VARS="${PROVIDER_VARS:-} GCE_ALPHA_FEATURES"
|
||||
fi
|
||||
|
||||
# Override default GLBC image
|
||||
if [[ -n "${GCE_GLBC_IMAGE:-}" ]]; then
|
||||
PROVIDER_VARS="${PROVIDER_VARS:-} GCE_GLBC_IMAGE"
|
||||
fi
|
||||
|
||||
# Admission Controllers to invoke prior to persisting objects in cluster
|
||||
# If we included ResourceQuota, we should keep it at the end of the list to prevent incrementing quota usage prematurely.
|
||||
ADMISSION_CONTROL=Initializers,NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,Priority,ResourceQuota
|
||||
|
@@ -287,6 +287,11 @@ if [[ -n "${GCE_ALPHA_FEATURES:-}" ]]; then
|
||||
PROVIDER_VARS="${PROVIDER_VARS:-} GCE_ALPHA_FEATURES"
|
||||
fi
|
||||
|
||||
# Override default GLBC image
|
||||
if [[ -n "${GCE_GLBC_IMAGE:-}" ]]; then
|
||||
PROVIDER_VARS="${PROVIDER_VARS:-} GCE_GLBC_IMAGE"
|
||||
fi
|
||||
|
||||
# If we included ResourceQuota, we should keep it at the end of the list to prevent incrementing quota usage prematurely.
|
||||
ADMISSION_CONTROL="${KUBE_ADMISSION_CONTROL:-Initializers,NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,PodPreset,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,Priority,ResourceQuota}"
|
||||
|
||||
|
@@ -1358,8 +1358,12 @@ function start-lb-controller {
|
||||
echo "Start GCE L7 pod"
|
||||
prepare-log-file /var/log/glbc.log
|
||||
setup-addon-manifests "addons" "cluster-loadbalancing/glbc"
|
||||
cp "${KUBE_HOME}/kube-manifests/kubernetes/gci-trusty/glbc.manifest" \
|
||||
/etc/kubernetes/manifests/
|
||||
|
||||
local -r glbc_manifest="${KUBE_HOME}/kube-manifests/kubernetes/gci-trusty/glbc.manifest"
|
||||
if [[ ! -z "${GCE_GLBC_IMAGE:-}" ]]; then
|
||||
sed -i "s@image:.*@image: ${GCE_GLBC_IMAGE}@" "${glbc_manifest}"
|
||||
fi
|
||||
cp "${glbc_manifest}" /etc/kubernetes/manifests/
|
||||
fi
|
||||
}
|
||||
|
||||
|
@@ -1878,8 +1878,12 @@ function start-lb-controller {
|
||||
echo "Start GCE L7 pod"
|
||||
prepare-log-file /var/log/glbc.log
|
||||
setup-addon-manifests "addons" "cluster-loadbalancing/glbc"
|
||||
cp "${KUBE_HOME}/kube-manifests/kubernetes/gci-trusty/glbc.manifest" \
|
||||
/etc/kubernetes/manifests/
|
||||
|
||||
local -r glbc_manifest="${KUBE_HOME}/kube-manifests/kubernetes/gci-trusty/glbc.manifest"
|
||||
if [[ ! -z "${GCE_GLBC_IMAGE:-}" ]]; then
|
||||
sed -i "s@image:.*@image: ${GCE_GLBC_IMAGE}@" "${glbc_manifest}"
|
||||
fi
|
||||
cp "${glbc_manifest}" /etc/kubernetes/manifests/
|
||||
fi
|
||||
}
|
||||
|
||||
|
@@ -7,6 +7,12 @@ options:
|
||||
type: string
|
||||
default: cluster.local
|
||||
description: The local domain for cluster dns
|
||||
extra_sans:
|
||||
type: string
|
||||
default: ""
|
||||
description: |
|
||||
Space-separated list of extra SAN entries to add to the x509 certificate
|
||||
created for the master nodes.
|
||||
service-cidr:
|
||||
type: string
|
||||
default: 10.152.183.0/24
|
||||
|
@@ -356,7 +356,7 @@ def start_master(etcd):
|
||||
'Configuring the Kubernetes master services.')
|
||||
freeze_service_cidr()
|
||||
if not etcd.get_connection_string():
|
||||
# etcd is not returning a connection string. This hapens when
|
||||
# etcd is not returning a connection string. This happens when
|
||||
# the master unit disconnects from etcd and is ready to terminate.
|
||||
# No point in trying to start master services and fail. Just return.
|
||||
return
|
||||
@@ -457,12 +457,38 @@ def send_data(tls):
|
||||
'kubernetes.default.svc',
|
||||
'kubernetes.default.svc.{0}'.format(domain)
|
||||
]
|
||||
|
||||
# maybe they have extra names they want as SANs
|
||||
extra_sans = hookenv.config('extra_sans')
|
||||
if extra_sans and not extra_sans == "":
|
||||
sans.extend(extra_sans.split())
|
||||
|
||||
# Create a path safe name by removing path characters from the unit name.
|
||||
certificate_name = hookenv.local_unit().replace('/', '_')
|
||||
# Request a server cert with this information.
|
||||
tls.request_server_cert(common_name, sans, certificate_name)
|
||||
|
||||
|
||||
@when('config.changed.extra_sans', 'certificates.available')
|
||||
def update_certificate(tls):
|
||||
# I using the config.changed flag instead of something more
|
||||
# specific to try and catch ip changes. Being a little
|
||||
# spammy here is ok because the cert layer checks for
|
||||
# changes to the cert before issuing a new one
|
||||
send_data(tls)
|
||||
|
||||
|
||||
@when('certificates.server.cert.available',
|
||||
'kubernetes-master.components.started')
|
||||
def kick_api_server(tls):
|
||||
# need to be idempotent and don't want to kick the api server
|
||||
# without need
|
||||
if data_changed('cert', tls.get_server_cert()):
|
||||
# certificate changed, so restart the api server
|
||||
hookenv.log("Certificate information changed, restarting api server")
|
||||
set_state('kube-apiserver.do-restart')
|
||||
|
||||
|
||||
@when('kubernetes-master.components.started')
|
||||
def configure_cdk_addons():
|
||||
''' Configure CDK addons '''
|
||||
|
@@ -4,13 +4,12 @@ apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: {{ RBD_NAME }}
|
||||
annotations:
|
||||
volume.beta.kubernetes.io/storage-class: "rbd"
|
||||
spec:
|
||||
capacity:
|
||||
storage: {{ RBD_SIZE }}M
|
||||
accessModes:
|
||||
- {{ PV_MODE }}
|
||||
storageClassName: "rbd"
|
||||
rbd:
|
||||
monitors:
|
||||
{% for host in monitors %}
|
||||
|
@@ -25,7 +25,7 @@
|
||||
"containers": [
|
||||
{
|
||||
"name": "cluster-autoscaler",
|
||||
"image": "gcr.io/google_containers/cluster-autoscaler:v1.0.1-beta1",
|
||||
"image": "gcr.io/google_containers/cluster-autoscaler:v1.0.1",
|
||||
"livenessProbe": {
|
||||
"httpGet": {
|
||||
"path": "/health-check",
|
||||
|
@@ -70,6 +70,7 @@ go_library(
|
||||
"//vendor/k8s.io/apiserver/pkg/storage/etcd3/preflight:go_default_library",
|
||||
"//vendor/k8s.io/client-go/informers:go_default_library",
|
||||
"//vendor/k8s.io/client-go/kubernetes:go_default_library",
|
||||
"//vendor/k8s.io/client-go/rest:go_default_library",
|
||||
"//vendor/k8s.io/client-go/tools/cache:go_default_library",
|
||||
"//vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration:go_default_library",
|
||||
"//vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1:go_default_library",
|
||||
|
@@ -84,6 +84,7 @@ import (
|
||||
"k8s.io/kubernetes/pkg/version"
|
||||
"k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/bootstrap"
|
||||
|
||||
"k8s.io/client-go/rest"
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
_ "k8s.io/kubernetes/pkg/util/reflector/prometheus" // for reflector metric registration
|
||||
_ "k8s.io/kubernetes/pkg/util/workqueue/prometheus" // for workqueue metric registration
|
||||
@@ -456,12 +457,15 @@ func BuildGenericConfig(s *options.ServerRunOptions, proxyTransport *http.Transp
|
||||
client,
|
||||
sharedInformers,
|
||||
serviceResolver,
|
||||
proxyTransport,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, nil, nil, nil, nil, fmt.Errorf("failed to create admission plugin initializer: %v", err)
|
||||
}
|
||||
|
||||
webhookClientConfig := rest.AnonymousClientConfig(genericConfig.LoopbackClientConfig)
|
||||
if proxyTransport != nil && proxyTransport.Dial != nil {
|
||||
webhookClientConfig.Dial = proxyTransport.Dial
|
||||
}
|
||||
// TODO: this is the wrong cert/key pair.
|
||||
// Given the generic case of webhook admission from a generic apiserver,
|
||||
// this key pair should be signed by the the API server's client CA.
|
||||
@@ -477,14 +481,17 @@ func BuildGenericConfig(s *options.ServerRunOptions, proxyTransport *http.Transp
|
||||
if err != nil {
|
||||
return nil, nil, nil, nil, nil, fmt.Errorf("failed to read proxy client key file from: %s, err: %v", s.ProxyClientKeyFile, err)
|
||||
}
|
||||
webhookClientConfig.TLSClientConfig.CertData = certBytes
|
||||
webhookClientConfig.TLSClientConfig.KeyData = keyBytes
|
||||
}
|
||||
webhookClientConfig.UserAgent = "kube-apiserver-admission"
|
||||
webhookClientConfig.Timeout = 30 * time.Second
|
||||
|
||||
err = s.Admission.ApplyTo(
|
||||
genericConfig,
|
||||
versionedInformers,
|
||||
certBytes,
|
||||
keyBytes,
|
||||
kubeClientConfig,
|
||||
webhookClientConfig,
|
||||
legacyscheme.Scheme,
|
||||
pluginInitializer)
|
||||
if err != nil {
|
||||
@@ -494,7 +501,7 @@ func BuildGenericConfig(s *options.ServerRunOptions, proxyTransport *http.Transp
|
||||
}
|
||||
|
||||
// BuildAdmissionPluginInitializer constructs the admission plugin initializer
|
||||
func BuildAdmissionPluginInitializer(s *options.ServerRunOptions, client internalclientset.Interface, sharedInformers informers.SharedInformerFactory, serviceResolver aggregatorapiserver.ServiceResolver, proxyTransport *http.Transport) (admission.PluginInitializer, error) {
|
||||
func BuildAdmissionPluginInitializer(s *options.ServerRunOptions, client internalclientset.Interface, sharedInformers informers.SharedInformerFactory, serviceResolver aggregatorapiserver.ServiceResolver) (admission.PluginInitializer, error) {
|
||||
var cloudConfig []byte
|
||||
|
||||
if s.CloudProvider.CloudConfigFile != "" {
|
||||
@@ -515,7 +522,6 @@ func BuildAdmissionPluginInitializer(s *options.ServerRunOptions, client interna
|
||||
pluginInitializer := kubeapiserveradmission.NewPluginInitializer(client, sharedInformers, cloudConfig, restMapper, quotaRegistry)
|
||||
|
||||
pluginInitializer = pluginInitializer.SetServiceResolver(serviceResolver)
|
||||
pluginInitializer = pluginInitializer.SetProxyTransport(proxyTransport)
|
||||
|
||||
return pluginInitializer, nil
|
||||
}
|
||||
|
@@ -120,9 +120,10 @@ func validateProxyMode(mode componentconfig.ProxyMode, fldPath *field.Path) fiel
|
||||
switch mode {
|
||||
case componentconfig.ProxyModeUserspace:
|
||||
case componentconfig.ProxyModeIPTables:
|
||||
case componentconfig.ProxyModeIPVS:
|
||||
case "":
|
||||
default:
|
||||
modes := []string{string(componentconfig.ProxyModeUserspace), string(componentconfig.ProxyModeIPTables)}
|
||||
modes := []string{string(componentconfig.ProxyModeUserspace), string(componentconfig.ProxyModeIPTables), string(componentconfig.ProxyModeIPVS)}
|
||||
errMsg := fmt.Sprintf("must be %s or blank (blank means the best-available proxy (currently iptables)", strings.Join(modes, ","))
|
||||
allErrs = append(allErrs, field.Invalid(fldPath.Child("ProxyMode"), string(mode), errMsg))
|
||||
}
|
||||
|
@@ -374,6 +374,7 @@ func TestValidateProxyMode(t *testing.T) {
|
||||
successCases := []componentconfig.ProxyMode{
|
||||
componentconfig.ProxyModeUserspace,
|
||||
componentconfig.ProxyModeIPTables,
|
||||
componentconfig.ProxyModeIPVS,
|
||||
componentconfig.ProxyMode(""),
|
||||
}
|
||||
|
||||
|
@@ -133,6 +133,9 @@ func (r *Reset) Run(out io.Writer) error {
|
||||
}
|
||||
|
||||
// Remove contents from the config and pki directories
|
||||
if r.certsDir != kubeadmapiext.DefaultCertificatesDir {
|
||||
fmt.Printf("[reset] WARNING: Cleaning a non-default certificates directory: %q\n", r.certsDir)
|
||||
}
|
||||
resetConfigDir(kubeadmconstants.KubernetesDir, r.certsDir)
|
||||
|
||||
return nil
|
||||
|
@@ -39,19 +39,21 @@ func SubCmdRunE(name string) func(*cobra.Command, []string) error {
|
||||
|
||||
// ValidateExactArgNumber validates that the required top-level arguments are specified
|
||||
func ValidateExactArgNumber(args []string, supportedArgs []string) error {
|
||||
lenSupported := len(supportedArgs)
|
||||
validArgs := 0
|
||||
// Disregard possible "" arguments; they are invalid
|
||||
for _, arg := range args {
|
||||
if len(arg) > 0 {
|
||||
validArgs++
|
||||
}
|
||||
// break early for too many arguments
|
||||
if validArgs > lenSupported {
|
||||
return fmt.Errorf("too many arguments. Required arguments: %v", supportedArgs)
|
||||
}
|
||||
}
|
||||
|
||||
if validArgs < len(supportedArgs) {
|
||||
if validArgs < lenSupported {
|
||||
return fmt.Errorf("missing one or more required arguments. Required arguments: %v", supportedArgs)
|
||||
}
|
||||
if validArgs > len(supportedArgs) {
|
||||
return fmt.Errorf("too many arguments, only %d argument(s) supported: %v", validArgs, supportedArgs)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@@ -55,6 +55,7 @@ import (
|
||||
|
||||
const (
|
||||
bridgenf = "/proc/sys/net/bridge/bridge-nf-call-iptables"
|
||||
bridgenf6 = "/proc/sys/net/bridge/bridge-nf-call-ip6tables"
|
||||
externalEtcdRequestTimeout = time.Duration(10 * time.Second)
|
||||
externalEtcdRequestRetries = 3
|
||||
externalEtcdRequestInterval = time.Duration(5 * time.Second)
|
||||
@@ -700,6 +701,13 @@ func RunInitMasterChecks(cfg *kubeadmapi.MasterConfiguration) error {
|
||||
}
|
||||
}
|
||||
|
||||
if ip := net.ParseIP(cfg.API.AdvertiseAddress); ip != nil {
|
||||
if ip.To4() == nil && ip.To16() != nil {
|
||||
checks = append(checks,
|
||||
FileContentCheck{Path: bridgenf6, Content: []byte{'1'}},
|
||||
)
|
||||
}
|
||||
}
|
||||
return RunChecks(checks, os.Stderr)
|
||||
}
|
||||
|
||||
@@ -734,6 +742,15 @@ func RunJoinNodeChecks(cfg *kubeadmapi.NodeConfiguration) error {
|
||||
InPathCheck{executable: "touch", mandatory: false},
|
||||
}
|
||||
|
||||
if len(cfg.DiscoveryTokenAPIServers) > 0 {
|
||||
if ip := net.ParseIP(cfg.DiscoveryTokenAPIServers[0]); ip != nil {
|
||||
if ip.To4() == nil && ip.To16() != nil {
|
||||
checks = append(checks,
|
||||
FileContentCheck{Path: bridgenf6, Content: []byte{'1'}},
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
return RunChecks(checks, os.Stderr)
|
||||
}
|
||||
|
||||
|
@@ -205,6 +205,12 @@ func TestRunInitMasterChecks(t *testing.T) {
|
||||
},
|
||||
expected: false,
|
||||
},
|
||||
{
|
||||
cfg: &kubeadmapi.MasterConfiguration{
|
||||
API: kubeadmapi.API{AdvertiseAddress: "2001:1234::1:15"},
|
||||
},
|
||||
expected: false,
|
||||
},
|
||||
}
|
||||
|
||||
for _, rt := range tests {
|
||||
@@ -229,6 +235,18 @@ func TestRunJoinNodeChecks(t *testing.T) {
|
||||
cfg: &kubeadmapi.NodeConfiguration{},
|
||||
expected: false,
|
||||
},
|
||||
{
|
||||
cfg: &kubeadmapi.NodeConfiguration{
|
||||
DiscoveryTokenAPIServers: []string{"192.168.1.15"},
|
||||
},
|
||||
expected: false,
|
||||
},
|
||||
{
|
||||
cfg: &kubeadmapi.NodeConfiguration{
|
||||
DiscoveryTokenAPIServers: []string{"2001:1234::1:15"},
|
||||
},
|
||||
expected: false,
|
||||
},
|
||||
}
|
||||
|
||||
for _, rt := range tests {
|
||||
|
@@ -156,6 +156,8 @@ type KubeletFlags struct {
|
||||
// This flag, if set, instructs the kubelet to keep volumes from terminated pods mounted to the node.
|
||||
// This can be useful for debugging volume related issues.
|
||||
KeepTerminatedPodVolumes bool
|
||||
// enable gathering custom metrics.
|
||||
EnableCustomMetrics bool
|
||||
}
|
||||
|
||||
// NewKubeletFlags will create a new KubeletFlags with default values
|
||||
@@ -184,6 +186,8 @@ func NewKubeletFlags() *KubeletFlags {
|
||||
ExperimentalQOSReserved: make(map[string]string),
|
||||
RemoteRuntimeEndpoint: remoteRuntimeEndpoint,
|
||||
RotateCertificates: false,
|
||||
// TODO(#54161:v1.11.0): Remove --enable-custom-metrics flag, it is deprecated.
|
||||
EnableCustomMetrics: false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -316,6 +320,9 @@ func (f *KubeletFlags) AddFlags(fs *pflag.FlagSet) {
|
||||
fs.MarkDeprecated("non-masquerade-cidr", "will be removed in a future version")
|
||||
fs.BoolVar(&f.KeepTerminatedPodVolumes, "keep-terminated-pod-volumes", f.KeepTerminatedPodVolumes, "Keep terminated pod volumes mounted to the node after the pod terminates. Can be useful for debugging volume related issues.")
|
||||
fs.MarkDeprecated("keep-terminated-pod-volumes", "will be removed in a future version")
|
||||
// TODO(#54161:v1.11.0): Remove --enable-custom-metrics flag, it is deprecated.
|
||||
fs.BoolVar(&f.EnableCustomMetrics, "enable-custom-metrics", f.EnableCustomMetrics, "Support for gathering custom metrics.")
|
||||
fs.MarkDeprecated("enable-custom-metrics", "will be removed in a future version")
|
||||
|
||||
}
|
||||
|
||||
@@ -428,7 +435,6 @@ func AddKubeletConfigFlags(fs *pflag.FlagSet, c *kubeletconfig.KubeletConfigurat
|
||||
fs.Int32Var(&c.KubeAPIBurst, "kube-api-burst", c.KubeAPIBurst, "Burst to use while talking with kubernetes apiserver")
|
||||
fs.BoolVar(&c.SerializeImagePulls, "serialize-image-pulls", c.SerializeImagePulls, "Pull images one at a time. We recommend *not* changing the default value on nodes that run docker daemon with version < 1.9 or an Aufs storage backend. Issue #10959 has more details.")
|
||||
|
||||
fs.BoolVar(&c.EnableCustomMetrics, "enable-custom-metrics", c.EnableCustomMetrics, "Support for gathering custom metrics.")
|
||||
fs.StringVar(&c.RuntimeCgroups, "runtime-cgroups", c.RuntimeCgroups, "Optional absolute name of cgroups to create and run the runtime in.")
|
||||
fs.StringVar(&c.EvictionHard, "eviction-hard", c.EvictionHard, "A set of eviction thresholds (e.g. memory.available<1Gi) that if met would trigger a pod eviction.")
|
||||
fs.StringVar(&c.EvictionSoft, "eviction-soft", c.EvictionSoft, "A set of eviction thresholds (e.g. memory.available<1.5Gi) that if met over a corresponding grace period would trigger a pod eviction.")
|
||||
|
@@ -720,6 +720,13 @@ Depending on the enclosing object, subresources might not be allowed. Required.<
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">urlPath</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">URLPath is an optional field that specifies the URL path to use when posting the AdmissionReview object.</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
|
||||
<td class="tableblock halign-left valign-top"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">caBundle</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">CABundle is a PEM encoded CA bundle which will be used to validate webhook’s server certificate. Required</p></td>
|
||||
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
|
||||
|
@@ -163,8 +163,6 @@ spec:
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: datadir
|
||||
annotations:
|
||||
volume.alpha.kubernetes.io/storage-class: anything
|
||||
spec:
|
||||
accessModes:
|
||||
- "ReadWriteOnce"
|
||||
|
@@ -82,13 +82,12 @@ spec:
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: cassandra-data
|
||||
annotations:
|
||||
volume.beta.kubernetes.io/storage-class: fast
|
||||
spec:
|
||||
accessModes: [ "ReadWriteOnce" ]
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
storageClassName: fast
|
||||
---
|
||||
kind: StorageClass
|
||||
apiVersion: storage.k8s.io/v1beta1
|
||||
|
@@ -39,8 +39,6 @@ spec:
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
annotations:
|
||||
volume.alpha.kubernetes.io/storage-class: anything
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
|
@@ -3,8 +3,6 @@ kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
# This name uniquely identifies the PVC. Will be used in deployment below.
|
||||
name: minio-pv-claim
|
||||
annotations:
|
||||
volume.alpha.kubernetes.io/storage-class: anything
|
||||
labels:
|
||||
app: minio-storage-claim
|
||||
spec:
|
||||
|
@@ -4,8 +4,6 @@ metadata:
|
||||
name: nfs-pv-provisioning-demo
|
||||
labels:
|
||||
demo: nfs-pv-provisioning
|
||||
annotations:
|
||||
volume.alpha.kubernetes.io/storage-class: any
|
||||
spec:
|
||||
accessModes: [ "ReadWriteOnce" ]
|
||||
resources:
|
||||
|
@@ -2,11 +2,10 @@ kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: pvcsc001
|
||||
annotations:
|
||||
volume.beta.kubernetes.io/storage-class: portworx-io-priority-high
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
storageClassName: portworx-io-priority-high
|
||||
|
@@ -2,11 +2,10 @@ kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: pvc-sio-small
|
||||
annotations:
|
||||
volume.beta.kubernetes.io/storage-class: sio-small
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
storageClassName: sio-small
|
||||
|
@@ -37,10 +37,9 @@ spec:
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: www
|
||||
annotations:
|
||||
volume.beta.kubernetes.io/storage-class: thin-disk
|
||||
spec:
|
||||
accessModes: [ "ReadWriteOnce" ]
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
storageClassName: thin-disk
|
||||
|
@@ -2,11 +2,10 @@ kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: pvcsc001
|
||||
annotations:
|
||||
volume.beta.kubernetes.io/storage-class: fast
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
storageClassName: fast
|
||||
|
@@ -84,6 +84,7 @@ go_library(
|
||||
"//vendor/k8s.io/apiserver/pkg/server/storage:go_default_library",
|
||||
"//vendor/k8s.io/client-go/informers:go_default_library",
|
||||
"//vendor/k8s.io/client-go/kubernetes:go_default_library",
|
||||
"//vendor/k8s.io/client-go/rest:go_default_library",
|
||||
"//vendor/k8s.io/kube-openapi/pkg/common:go_default_library",
|
||||
],
|
||||
)
|
||||
|
@@ -42,6 +42,7 @@ import (
|
||||
serverstorage "k8s.io/apiserver/pkg/server/storage"
|
||||
clientgoinformers "k8s.io/client-go/informers"
|
||||
clientgoclientset "k8s.io/client-go/kubernetes"
|
||||
"k8s.io/client-go/rest"
|
||||
openapicommon "k8s.io/kube-openapi/pkg/common"
|
||||
federationv1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1"
|
||||
"k8s.io/kubernetes/federation/cmd/federation-apiserver/app/options"
|
||||
@@ -215,9 +216,8 @@ func NonBlockingRun(s *options.ServerRunOptions, stopCh <-chan struct{}) error {
|
||||
err = s.Admission.ApplyTo(
|
||||
genericConfig,
|
||||
versionedInformers,
|
||||
nil,
|
||||
nil,
|
||||
kubeClientConfig,
|
||||
rest.AnonymousClientConfig(kubeClientConfig),
|
||||
legacyscheme.Scheme,
|
||||
pluginInitializer,
|
||||
)
|
||||
|
@@ -136,6 +136,8 @@ type initFederation struct {
|
||||
type initFederationOptions struct {
|
||||
dnsZoneName string
|
||||
serverImage string
|
||||
imagePullPolicy string
|
||||
imagePullSecrets string
|
||||
dnsProvider string
|
||||
dnsProviderConfig string
|
||||
etcdImage string
|
||||
@@ -161,6 +163,8 @@ type initFederationOptions struct {
|
||||
func (o *initFederationOptions) Bind(flags *pflag.FlagSet, defaultServerImage, defaultEtcdImage string) {
|
||||
flags.StringVar(&o.dnsZoneName, "dns-zone-name", "", "DNS suffix for this federation. Federated Service DNS names are published with this suffix.")
|
||||
flags.StringVar(&o.serverImage, "image", defaultServerImage, "Image to use for federation API server and controller manager binaries.")
|
||||
flags.StringVar(&o.imagePullPolicy, "image-pull-policy", string(api.PullIfNotPresent), "PullPolicy describes a policy for if/when to pull a container image. The default pull policy is IfNotPresent which will not pull an image if it already exists.")
|
||||
flags.StringVar(&o.imagePullSecrets, "image-pull-secrets", "", "Provide secrets that can access the private registry.")
|
||||
flags.StringVar(&o.dnsProvider, "dns-provider", "", "Dns provider to be used for this deployment.")
|
||||
flags.StringVar(&o.dnsProviderConfig, "dns-provider-config", "", "Config file path on local file system for configuring DNS provider.")
|
||||
flags.StringVar(&o.etcdImage, "etcd-image", defaultEtcdImage, "Image to use for etcd server.")
|
||||
@@ -368,7 +372,7 @@ func (i *initFederation) Run(cmdOut io.Writer, config util.AdminConfig) error {
|
||||
|
||||
fmt.Fprint(cmdOut, "Creating federation component deployments...")
|
||||
glog.V(4).Info("Creating federation control plane components")
|
||||
_, err = createAPIServer(hostClientset, i.commonOptions.FederationSystemNamespace, serverName, i.commonOptions.Name, i.options.serverImage, i.options.etcdImage, advertiseAddress, serverCredName, i.options.apiServerEnableHTTPBasicAuth, i.options.apiServerEnableTokenAuth, i.options.apiServerOverrides, pvc, i.options.dryRun, i.options.nodeSelector)
|
||||
_, err = createAPIServer(hostClientset, i.commonOptions.FederationSystemNamespace, serverName, i.commonOptions.Name, i.options.serverImage, i.options.etcdImage, advertiseAddress, serverCredName, i.options.apiServerEnableHTTPBasicAuth, i.options.apiServerEnableTokenAuth, i.options.apiServerOverrides, pvc, i.options.dryRun, i.options.nodeSelector, i.options.imagePullPolicy, i.options.imagePullSecrets)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -403,7 +407,7 @@ func (i *initFederation) Run(cmdOut io.Writer, config util.AdminConfig) error {
|
||||
|
||||
glog.V(4).Info("Creating federation controller manager deployment")
|
||||
|
||||
_, err = createControllerManager(hostClientset, i.commonOptions.FederationSystemNamespace, i.commonOptions.Name, svc.Name, cmName, i.options.serverImage, cmKubeconfigName, i.options.dnsZoneName, i.options.dnsProvider, i.options.dnsProviderConfig, sa.Name, dnsProviderSecret, i.options.controllerManagerOverrides, i.options.dryRun, i.options.nodeSelector)
|
||||
_, err = createControllerManager(hostClientset, i.commonOptions.FederationSystemNamespace, i.commonOptions.Name, svc.Name, cmName, i.options.serverImage, cmKubeconfigName, i.options.dnsZoneName, i.options.dnsProvider, i.options.dnsProviderConfig, sa.Name, dnsProviderSecret, i.options.controllerManagerOverrides, i.options.dryRun, i.options.nodeSelector, i.options.imagePullPolicy, i.options.imagePullSecrets)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -709,7 +713,7 @@ func createPVC(clientset client.Interface, namespace, svcName, federationName, e
|
||||
return clientset.Core().PersistentVolumeClaims(namespace).Create(pvc)
|
||||
}
|
||||
|
||||
func createAPIServer(clientset client.Interface, namespace, name, federationName, serverImage, etcdImage, advertiseAddress, credentialsName string, hasHTTPBasicAuthFile, hasTokenAuthFile bool, argOverrides map[string]string, pvc *api.PersistentVolumeClaim, dryRun bool, nodeSelector map[string]string) (*extensions.Deployment, error) {
|
||||
func createAPIServer(clientset client.Interface, namespace, name, federationName, serverImage, etcdImage, advertiseAddress, credentialsName string, hasHTTPBasicAuthFile, hasTokenAuthFile bool, argOverrides map[string]string, pvc *api.PersistentVolumeClaim, dryRun bool, nodeSelector map[string]string, imagePullPolicy, imagePullSecrets string) (*extensions.Deployment, error) {
|
||||
command := []string{
|
||||
"/hyperkube",
|
||||
"federation-apiserver",
|
||||
@@ -755,9 +759,10 @@ func createAPIServer(clientset client.Interface, namespace, name, federationName
|
||||
Spec: api.PodSpec{
|
||||
Containers: []api.Container{
|
||||
{
|
||||
Name: "apiserver",
|
||||
Image: serverImage,
|
||||
Command: command,
|
||||
Name: "apiserver",
|
||||
Image: serverImage,
|
||||
ImagePullPolicy: api.PullPolicy(imagePullPolicy),
|
||||
Command: command,
|
||||
Ports: []api.ContainerPort{
|
||||
{
|
||||
Name: apiServerSecurePortName,
|
||||
@@ -787,6 +792,11 @@ func createAPIServer(clientset client.Interface, namespace, name, federationName
|
||||
},
|
||||
},
|
||||
NodeSelector: nodeSelector,
|
||||
ImagePullSecrets: []api.LocalObjectReference{
|
||||
{
|
||||
Name: imagePullSecrets,
|
||||
},
|
||||
},
|
||||
Volumes: []api.Volume{
|
||||
{
|
||||
Name: credentialsName,
|
||||
@@ -884,7 +894,7 @@ func createRoleBindings(clientset client.Interface, namespace, saName, federatio
|
||||
return newRole, newRolebinding, err
|
||||
}
|
||||
|
||||
func createControllerManager(clientset client.Interface, namespace, name, svcName, cmName, image, kubeconfigName, dnsZoneName, dnsProvider, dnsProviderConfig, saName string, dnsProviderSecret *api.Secret, argOverrides map[string]string, dryRun bool, nodeSelector map[string]string) (*extensions.Deployment, error) {
|
||||
func createControllerManager(clientset client.Interface, namespace, name, svcName, cmName, image, kubeconfigName, dnsZoneName, dnsProvider, dnsProviderConfig, saName string, dnsProviderSecret *api.Secret, argOverrides map[string]string, dryRun bool, nodeSelector map[string]string, imagePullPolicy, imagePullSecrets string) (*extensions.Deployment, error) {
|
||||
command := []string{
|
||||
"/hyperkube",
|
||||
"federation-controller-manager",
|
||||
@@ -931,9 +941,10 @@ func createControllerManager(clientset client.Interface, namespace, name, svcNam
|
||||
Spec: api.PodSpec{
|
||||
Containers: []api.Container{
|
||||
{
|
||||
Name: "controller-manager",
|
||||
Image: image,
|
||||
Command: command,
|
||||
Name: "controller-manager",
|
||||
Image: image,
|
||||
ImagePullPolicy: api.PullPolicy(imagePullPolicy),
|
||||
Command: command,
|
||||
VolumeMounts: []api.VolumeMount{
|
||||
{
|
||||
Name: kubeconfigName,
|
||||
@@ -954,6 +965,11 @@ func createControllerManager(clientset client.Interface, namespace, name, svcNam
|
||||
},
|
||||
},
|
||||
NodeSelector: nodeSelector,
|
||||
ImagePullSecrets: []api.LocalObjectReference{
|
||||
{
|
||||
Name: imagePullSecrets,
|
||||
},
|
||||
},
|
||||
Volumes: []api.Volume{
|
||||
{
|
||||
Name: kubeconfigName,
|
||||
|
@@ -97,6 +97,8 @@ func TestInitFederation(t *testing.T) {
|
||||
apiserverServiceType v1.ServiceType
|
||||
advertiseAddress string
|
||||
serverImage string
|
||||
imagePullPolicy string
|
||||
imagePullSecrets string
|
||||
etcdImage string
|
||||
etcdPVCapacity string
|
||||
etcdPVStorageClass string
|
||||
@@ -120,6 +122,7 @@ func TestInitFederation(t *testing.T) {
|
||||
lbIP: lbIP,
|
||||
apiserverServiceType: v1.ServiceTypeLoadBalancer,
|
||||
serverImage: "example.test/foo:bar",
|
||||
imagePullPolicy: "IfNotPresent",
|
||||
etcdPVCapacity: "5Gi",
|
||||
etcdPersistence: "true",
|
||||
expectedErr: "",
|
||||
@@ -138,6 +141,7 @@ func TestInitFederation(t *testing.T) {
|
||||
lbIP: lbIP,
|
||||
apiserverServiceType: v1.ServiceTypeLoadBalancer,
|
||||
serverImage: "example.test/foo:bar",
|
||||
imagePullPolicy: "IfNotPresent",
|
||||
etcdPVCapacity: "", //test for default value of pvc-size
|
||||
etcdPersistence: "true",
|
||||
expectedErr: "",
|
||||
@@ -151,6 +155,7 @@ func TestInitFederation(t *testing.T) {
|
||||
lbIP: lbIP,
|
||||
apiserverServiceType: v1.ServiceTypeLoadBalancer,
|
||||
serverImage: "example.test/foo:bar",
|
||||
imagePullPolicy: "IfNotPresent",
|
||||
etcdPVCapacity: "",
|
||||
etcdPersistence: "true",
|
||||
expectedErr: "",
|
||||
@@ -164,6 +169,7 @@ func TestInitFederation(t *testing.T) {
|
||||
lbIP: lbIP,
|
||||
apiserverServiceType: v1.ServiceTypeLoadBalancer,
|
||||
serverImage: "example.test/foo:bar",
|
||||
imagePullPolicy: "IfNotPresent",
|
||||
etcdPVCapacity: "5Gi",
|
||||
etcdPersistence: "false",
|
||||
expectedErr: "",
|
||||
@@ -176,6 +182,7 @@ func TestInitFederation(t *testing.T) {
|
||||
dnsZoneName: "example.test.",
|
||||
apiserverServiceType: v1.ServiceTypeNodePort,
|
||||
serverImage: "example.test/foo:bar",
|
||||
imagePullPolicy: "IfNotPresent",
|
||||
etcdPVCapacity: "5Gi",
|
||||
etcdPersistence: "true",
|
||||
expectedErr: "",
|
||||
@@ -189,6 +196,7 @@ func TestInitFederation(t *testing.T) {
|
||||
apiserverServiceType: v1.ServiceTypeNodePort,
|
||||
advertiseAddress: nodeIP,
|
||||
serverImage: "example.test/foo:bar",
|
||||
imagePullPolicy: "IfNotPresent",
|
||||
etcdPVCapacity: "5Gi",
|
||||
etcdPersistence: "true",
|
||||
expectedErr: "",
|
||||
@@ -202,6 +210,7 @@ func TestInitFederation(t *testing.T) {
|
||||
apiserverServiceType: v1.ServiceTypeNodePort,
|
||||
advertiseAddress: nodeIP,
|
||||
serverImage: "example.test/foo:bar",
|
||||
imagePullPolicy: "IfNotPresent",
|
||||
etcdImage: "gcr.io/google_containers/etcd:latest",
|
||||
etcdPVCapacity: "5Gi",
|
||||
etcdPVStorageClass: "fast",
|
||||
@@ -248,8 +257,11 @@ func TestInitFederation(t *testing.T) {
|
||||
if tc.etcdImage == "" {
|
||||
tc.etcdImage = defaultEtcdImage
|
||||
}
|
||||
if tc.imagePullPolicy == "" {
|
||||
tc.imagePullPolicy = "IfNotPresent"
|
||||
}
|
||||
|
||||
hostFactory, err := fakeInitHostFactory(tc.apiserverServiceType, tc.federation, util.DefaultFederationSystemNamespace, tc.advertiseAddress, tc.lbIP, tc.dnsZoneName, tc.serverImage, tc.etcdImage, tc.dnsProvider, tc.dnsProviderConfig, tc.etcdPersistence, tc.etcdPVCapacity, tc.etcdPVStorageClass, tc.apiserverArgOverrides, tc.cmArgOverrides, tmpDirPath, tc.apiserverEnableHTTPBasicAuth, tc.apiserverEnableTokenAuth, tc.isRBACAPIAvailable, tc.nodeSelector)
|
||||
hostFactory, err := fakeInitHostFactory(tc.apiserverServiceType, tc.federation, util.DefaultFederationSystemNamespace, tc.advertiseAddress, tc.lbIP, tc.dnsZoneName, tc.serverImage, tc.etcdImage, tc.dnsProvider, tc.dnsProviderConfig, tc.etcdPersistence, tc.etcdPVCapacity, tc.etcdPVStorageClass, tc.apiserverArgOverrides, tc.cmArgOverrides, tmpDirPath, tc.apiserverEnableHTTPBasicAuth, tc.apiserverEnableTokenAuth, tc.isRBACAPIAvailable, tc.nodeSelector, tc.imagePullPolicy, tc.imagePullSecrets)
|
||||
if err != nil {
|
||||
t.Fatalf("[%d] unexpected error: %v", i, err)
|
||||
}
|
||||
@@ -266,6 +278,7 @@ func TestInitFederation(t *testing.T) {
|
||||
cmd.Flags().Set("dns-zone-name", tc.dnsZoneName)
|
||||
cmd.Flags().Set("image", tc.serverImage)
|
||||
cmd.Flags().Set("etcd-image", tc.etcdImage)
|
||||
cmd.Flags().Set("image-pull-policy", tc.imagePullPolicy)
|
||||
cmd.Flags().Set("dns-provider", tc.dnsProvider)
|
||||
cmd.Flags().Set("apiserver-arg-overrides", tc.apiserverArgOverrides)
|
||||
cmd.Flags().Set("controllermanager-arg-overrides", tc.cmArgOverrides)
|
||||
@@ -282,6 +295,9 @@ func TestInitFederation(t *testing.T) {
|
||||
if tc.etcdPersistence != "true" {
|
||||
cmd.Flags().Set("etcd-persistent-storage", tc.etcdPersistence)
|
||||
}
|
||||
if tc.imagePullSecrets != "" {
|
||||
cmd.Flags().Set("image-pull-secrets", tc.imagePullSecrets)
|
||||
}
|
||||
if tc.apiserverServiceType != v1.ServiceTypeLoadBalancer {
|
||||
cmd.Flags().Set(apiserverServiceTypeFlag, string(tc.apiserverServiceType))
|
||||
cmd.Flags().Set(apiserverAdvertiseAddressFlag, tc.advertiseAddress)
|
||||
@@ -627,7 +643,7 @@ func TestCertsHTTPS(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func fakeInitHostFactory(apiserverServiceType v1.ServiceType, federationName, namespaceName, advertiseAddress, lbIp, dnsZoneName, serverImage, etcdImage, dnsProvider, dnsProviderConfig, etcdPersistence, etcdPVCapacity, etcdPVStorageClass, apiserverOverrideArg, cmOverrideArg, tmpDirPath string, apiserverEnableHTTPBasicAuth, apiserverEnableTokenAuth, isRBACAPIAvailable bool, nodeSelectorString string) (cmdutil.Factory, error) {
|
||||
func fakeInitHostFactory(apiserverServiceType v1.ServiceType, federationName, namespaceName, advertiseAddress, lbIp, dnsZoneName, serverImage, etcdImage, dnsProvider, dnsProviderConfig, etcdPersistence, etcdPVCapacity, etcdPVStorageClass, apiserverOverrideArg, cmOverrideArg, tmpDirPath string, apiserverEnableHTTPBasicAuth, apiserverEnableTokenAuth, isRBACAPIAvailable bool, nodeSelectorString string, imagePullPolicy, imagePullSecrets string) (cmdutil.Factory, error) {
|
||||
svcName := federationName + "-apiserver"
|
||||
svcUrlPrefix := "/api/v1/namespaces/federation-system/services"
|
||||
credSecretName := svcName + "-credentials"
|
||||
@@ -923,9 +939,10 @@ func fakeInitHostFactory(apiserverServiceType v1.ServiceType, federationName, na
|
||||
Spec: v1.PodSpec{
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: "apiserver",
|
||||
Image: serverImage,
|
||||
Command: apiserverCommand,
|
||||
Name: "apiserver",
|
||||
Image: serverImage,
|
||||
ImagePullPolicy: v1.PullPolicy(imagePullPolicy),
|
||||
Command: apiserverCommand,
|
||||
Ports: []v1.ContainerPort{
|
||||
{
|
||||
Name: apiServerSecurePortName,
|
||||
@@ -955,6 +972,11 @@ func fakeInitHostFactory(apiserverServiceType v1.ServiceType, federationName, na
|
||||
},
|
||||
},
|
||||
NodeSelector: nodeSelector,
|
||||
ImagePullSecrets: []v1.LocalObjectReference{
|
||||
{
|
||||
Name: imagePullSecrets,
|
||||
},
|
||||
},
|
||||
Volumes: []v1.Volume{
|
||||
{
|
||||
Name: credSecretName,
|
||||
@@ -1041,9 +1063,10 @@ func fakeInitHostFactory(apiserverServiceType v1.ServiceType, federationName, na
|
||||
Spec: v1.PodSpec{
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: "controller-manager",
|
||||
Image: serverImage,
|
||||
Command: cmCommand,
|
||||
Name: "controller-manager",
|
||||
Image: serverImage,
|
||||
ImagePullPolicy: v1.PullPolicy(imagePullPolicy),
|
||||
Command: cmCommand,
|
||||
VolumeMounts: []v1.VolumeMount{
|
||||
{
|
||||
Name: cmKubeconfigSecretName,
|
||||
@@ -1064,6 +1087,11 @@ func fakeInitHostFactory(apiserverServiceType v1.ServiceType, federationName, na
|
||||
},
|
||||
},
|
||||
NodeSelector: nodeSelector,
|
||||
ImagePullSecrets: []v1.LocalObjectReference{
|
||||
{
|
||||
Name: imagePullSecrets,
|
||||
},
|
||||
},
|
||||
Volumes: []v1.Volume{
|
||||
{
|
||||
Name: cmKubeconfigSecretName,
|
||||
|
@@ -34,7 +34,6 @@ go_library(
|
||||
"//test/e2e/chaosmonkey:go_default_library",
|
||||
"//test/e2e/common:go_default_library",
|
||||
"//test/e2e/framework:go_default_library",
|
||||
"//test/utils/image:go_default_library",
|
||||
"//vendor/github.com/onsi/ginkgo:go_default_library",
|
||||
"//vendor/github.com/onsi/gomega:go_default_library",
|
||||
"//vendor/k8s.io/api/batch/v1:go_default_library",
|
||||
|
@@ -29,7 +29,6 @@ import (
|
||||
fedutil "k8s.io/kubernetes/federation/pkg/federation-controller/util"
|
||||
fedframework "k8s.io/kubernetes/federation/test/e2e/framework"
|
||||
"k8s.io/kubernetes/test/e2e/framework"
|
||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
@@ -279,7 +278,7 @@ func newJobForFed(namespace string, name string, completions int32, parallelism
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: "sleep",
|
||||
Image: imageutils.GetBusyBoxImage(),
|
||||
Image: "busybox",
|
||||
Command: []string{"sleep", "1"},
|
||||
},
|
||||
},
|
||||
|
@@ -36,7 +36,6 @@ import (
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -403,7 +402,7 @@ func discoverService(f *fedframework.Framework, name string, exists bool, podNam
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: "federated-service-discovery-container",
|
||||
Image: imageutils.GetBusyBoxImage(),
|
||||
Image: "busybox",
|
||||
Command: command,
|
||||
},
|
||||
},
|
||||
|
@@ -209,7 +209,7 @@ pkg/kubelet
|
||||
pkg/kubelet/apis
|
||||
pkg/kubelet/apis/cri/testing
|
||||
pkg/kubelet/apis/cri/v1alpha1/runtime
|
||||
pkg/kubelet/apis/deviceplugin/v1alpha1
|
||||
pkg/kubelet/apis/deviceplugin/v1alpha
|
||||
pkg/kubelet/apis/kubeletconfig
|
||||
pkg/kubelet/apis/kubeletconfig/v1alpha1
|
||||
pkg/kubelet/cadvisor
|
||||
@@ -778,6 +778,14 @@ staging/src/k8s.io/sample-apiserver/pkg/client/informers/internalversion/interna
|
||||
staging/src/k8s.io/sample-apiserver/pkg/cmd/server
|
||||
staging/src/k8s.io/sample-apiserver/pkg/registry/wardle/fischer
|
||||
staging/src/k8s.io/sample-apiserver/pkg/registry/wardle/flunder
|
||||
staging/src/k8s.io/sample-controller/pkg/apis/samplecontroller
|
||||
staging/src/k8s.io/sample-controller/pkg/apis/samplecontroller/v1alpha1
|
||||
staging/src/k8s.io/sample-controller/pkg/client/clientset/versioned
|
||||
staging/src/k8s.io/sample-controller/pkg/client/clientset/versioned/fake
|
||||
staging/src/k8s.io/sample-controller/pkg/client/clientset/versioned/scheme
|
||||
staging/src/k8s.io/sample-controller/pkg/client/clientset/versioned/typed/samplecontroller/v1alpha1
|
||||
staging/src/k8s.io/sample-controller/pkg/client/clientset/versioned/typed/samplecontroller/v1alpha1/fake
|
||||
staging/src/k8s.io/sample-controller/pkg/client/informers/externalversions/internalinterfaces
|
||||
test/e2e
|
||||
test/e2e/apimachinery
|
||||
test/e2e/apps
|
||||
|
@@ -39,7 +39,7 @@ function kfind() {
|
||||
# include the "special" vendor directories which are actually part
|
||||
# of the Kubernetes source tree - generators will use these for
|
||||
# including certain core API concepts.
|
||||
find -H . ./vendor/k8s.io/apimachinery ./vendor/k8s.io/apiserver ./vendor/k8s.io/kube-aggregator ./vendor/k8s.io/apiextensions-apiserver ./vendor/k8s.io/metrics ./vendor/k8s.io/sample-apiserver ./vendor/k8s.io/api ./vendor/k8s.io/client-go ./vendor/k8s.io/code-generator \
|
||||
find -H . ./vendor/k8s.io/apimachinery ./vendor/k8s.io/apiserver ./vendor/k8s.io/kube-aggregator ./vendor/k8s.io/apiextensions-apiserver ./vendor/k8s.io/metrics ./vendor/k8s.io/sample-apiserver ./vendor/k8s.io/api ./vendor/k8s.io/client-go ./vendor/k8s.io/code-generator ./vendor/k8s.io/sample-controller \
|
||||
\( \
|
||||
-not \( \
|
||||
\( \
|
||||
|
@@ -915,6 +915,32 @@ __EOF__
|
||||
set +o errexit
|
||||
}
|
||||
|
||||
# runs specific kubectl create tests
|
||||
run_create_tests() {
|
||||
set -o nounset
|
||||
set -o errexit
|
||||
|
||||
### Create generic secret with explicit namespace
|
||||
# Pre-condition: secret 'mysecret' does not exist
|
||||
output_message=$(! kubectl get secrets mysecret 2>&1 "${kube_flags[@]}")
|
||||
kube::test::if_has_string "${output_message}" 'secrets "mysecret" not found'
|
||||
# Command
|
||||
output_message=$(kubectl create "${kube_flags[@]}" secret generic mysecret --dry-run --from-literal=foo=bar -o jsonpath='{.metadata.namespace}' --namespace=user-specified)
|
||||
# Post-condition: mysecret still not created since --dry-run was used
|
||||
# Output from 'create' command should contain the specified --namespace value
|
||||
failure_message=$(! kubectl get secrets mysecret 2>&1 "${kube_flags[@]}")
|
||||
kube::test::if_has_string "${failure_message}" 'secrets "mysecret" not found'
|
||||
kube::test::if_has_string "${output_message}" 'user-specified'
|
||||
# Command
|
||||
output_message=$(kubectl create "${kube_flags[@]}" secret generic mysecret --dry-run --from-literal=foo=bar -o jsonpath='{.metadata.namespace}')
|
||||
# Post-condition: jsonpath for .metadata.namespace should be empty for object since --namespace was not explicitly specified
|
||||
kube::test::if_empty_string "${output_message}"
|
||||
|
||||
set +o nounset
|
||||
set +o errexit
|
||||
}
|
||||
|
||||
|
||||
# Runs tests related to kubectl apply.
|
||||
run_kubectl_apply_tests() {
|
||||
set -o nounset
|
||||
@@ -4568,6 +4594,14 @@ runTests() {
|
||||
record_command run_kubectl_get_tests
|
||||
fi
|
||||
|
||||
|
||||
######################
|
||||
# Create #
|
||||
######################
|
||||
if kube::test::if_supports_resource "${secrets}" ; then
|
||||
record_command run_create_tests
|
||||
fi
|
||||
|
||||
##################
|
||||
# Global timeout #
|
||||
##################
|
||||
|
@@ -125,5 +125,6 @@ ${informergen} \
|
||||
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/code-generator/hack/update-codegen.sh
|
||||
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/kube-aggregator/hack/update-codegen.sh
|
||||
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/sample-apiserver/hack/update-codegen.sh
|
||||
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/sample-controller/hack/update-codegen.sh
|
||||
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/apiextensions-apiserver/hack/update-codegen.sh
|
||||
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/metrics/hack/update-codegen.sh
|
||||
|
@@ -19,8 +19,7 @@ set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
KUBE_ROOT="$(cd "$(dirname "${BASH_SOURCE}")/../" && pwd -P)"
|
||||
DEVICE_PLUGIN_ROOT="${KUBE_ROOT}/pkg/kubelet/apis/deviceplugin/v1alpha1/"
|
||||
DEVICE_PLUGIN_ROOT="${KUBE_ROOT}/pkg/kubelet/apis/deviceplugin/v1alpha/"
|
||||
|
||||
source "${KUBE_ROOT}/hack/lib/protoc.sh"
|
||||
|
||||
kube::protoc::generate_proto ${DEVICE_PLUGIN_ROOT}
|
||||
|
@@ -30,6 +30,7 @@ kube::golang::setup_env
|
||||
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/code-generator/hack/verify-codegen.sh
|
||||
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/kube-aggregator/hack/verify-codegen.sh
|
||||
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/sample-apiserver/hack/verify-codegen.sh
|
||||
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/sample-controller/hack/verify-codegen.sh
|
||||
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/apiextensions-apiserver/hack/verify-codegen.sh
|
||||
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/metrics/hack/verify-codegen.sh
|
||||
|
||||
|
@@ -19,8 +19,8 @@ set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
||||
DEVICE_PLUGIN_ROOT="${KUBE_ROOT}/pkg/kubelet/apis/deviceplugin/v1alpha1/"
|
||||
ERROR="Device plugin api is out of date. Please run hack/update-generated-device-plugin.sh"
|
||||
DEVICE_PLUGIN_ROOT="${KUBE_ROOT}/pkg/kubelet/apis/deviceplugin/v1alpha/"
|
||||
|
||||
source "${KUBE_ROOT}/hack/lib/protoc.sh"
|
||||
kube::golang::setup_env
|
||||
|
@@ -199,6 +199,10 @@ type AdmissionHookClientConfig struct {
|
||||
// ports open, port 443 will be used if it is open, otherwise it is an error.
|
||||
// Required
|
||||
Service ServiceReference
|
||||
|
||||
// URLPath is an optional field that specifies the URL path to use when posting the AdmissionReview object.
|
||||
URLPath string
|
||||
|
||||
// CABundle is a PEM encoded CA bundle which will be used to validate webhook's server certificate.
|
||||
// Required
|
||||
CABundle []byte
|
||||
|
@@ -63,6 +63,7 @@ func autoConvert_v1alpha1_AdmissionHookClientConfig_To_admissionregistration_Adm
|
||||
if err := Convert_v1alpha1_ServiceReference_To_admissionregistration_ServiceReference(&in.Service, &out.Service, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.URLPath = in.URLPath
|
||||
out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle))
|
||||
return nil
|
||||
}
|
||||
@@ -76,6 +77,7 @@ func autoConvert_admissionregistration_AdmissionHookClientConfig_To_v1alpha1_Adm
|
||||
if err := Convert_admissionregistration_ServiceReference_To_v1alpha1_ServiceReference(&in.Service, &out.Service, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.URLPath = in.URLPath
|
||||
out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle))
|
||||
return nil
|
||||
}
|
||||
|
@@ -182,6 +182,44 @@ func validateExternalAdmissionHook(hook *admissionregistration.ExternalAdmission
|
||||
if hook.FailurePolicy != nil && !supportedFailurePolicies.Has(string(*hook.FailurePolicy)) {
|
||||
allErrors = append(allErrors, field.NotSupported(fldPath.Child("failurePolicy"), *hook.FailurePolicy, supportedFailurePolicies.List()))
|
||||
}
|
||||
|
||||
if len(hook.ClientConfig.URLPath) != 0 {
|
||||
allErrors = append(allErrors, validateURLPath(fldPath.Child("clientConfig", "urlPath"), hook.ClientConfig.URLPath)...)
|
||||
}
|
||||
|
||||
return allErrors
|
||||
}
|
||||
|
||||
func validateURLPath(fldPath *field.Path, urlPath string) field.ErrorList {
|
||||
var allErrors field.ErrorList
|
||||
if urlPath == "/" || len(urlPath) == 0 {
|
||||
return allErrors
|
||||
}
|
||||
if urlPath == "//" {
|
||||
allErrors = append(allErrors, field.Invalid(fldPath, urlPath, "segment[0] may not be empty"))
|
||||
return allErrors
|
||||
}
|
||||
|
||||
if !strings.HasPrefix(urlPath, "/") {
|
||||
allErrors = append(allErrors, field.Invalid(fldPath, urlPath, "must start with a '/'"))
|
||||
}
|
||||
|
||||
urlPathToCheck := urlPath[1:]
|
||||
if strings.HasSuffix(urlPathToCheck, "/") {
|
||||
urlPathToCheck = urlPathToCheck[:len(urlPathToCheck)-1]
|
||||
}
|
||||
steps := strings.Split(urlPathToCheck, "/")
|
||||
for i, step := range steps {
|
||||
if len(step) == 0 {
|
||||
allErrors = append(allErrors, field.Invalid(fldPath, urlPath, fmt.Sprintf("segment[%d] may not be empty", i)))
|
||||
continue
|
||||
}
|
||||
failures := validation.IsDNS1123Subdomain(step)
|
||||
for _, failure := range failures {
|
||||
allErrors = append(allErrors, field.Invalid(fldPath, urlPath, fmt.Sprintf("segment[%d]: %v", i, failure)))
|
||||
}
|
||||
}
|
||||
|
||||
return allErrors
|
||||
}
|
||||
|
||||
|
@@ -482,18 +482,111 @@ func TestValidateExternalAdmissionHookConfiguration(t *testing.T) {
|
||||
}),
|
||||
expectedError: `externalAdmissionHooks[0].failurePolicy: Unsupported value: "other": supported values: "Fail", "Ignore"`,
|
||||
},
|
||||
{
|
||||
name: "URLPath must start with slash",
|
||||
config: getExternalAdmissionHookConfiguration(
|
||||
[]admissionregistration.ExternalAdmissionHook{
|
||||
{
|
||||
Name: "webhook.k8s.io",
|
||||
ClientConfig: admissionregistration.AdmissionHookClientConfig{
|
||||
URLPath: "foo/",
|
||||
},
|
||||
},
|
||||
}),
|
||||
expectedError: `clientConfig.urlPath: Invalid value: "foo/": must start with a '/'`,
|
||||
},
|
||||
{
|
||||
name: "URLPath accepts slash",
|
||||
config: getExternalAdmissionHookConfiguration(
|
||||
[]admissionregistration.ExternalAdmissionHook{
|
||||
{
|
||||
Name: "webhook.k8s.io",
|
||||
ClientConfig: admissionregistration.AdmissionHookClientConfig{
|
||||
URLPath: "/",
|
||||
},
|
||||
},
|
||||
}),
|
||||
expectedError: ``,
|
||||
},
|
||||
{
|
||||
name: "URLPath accepts no trailing slash",
|
||||
config: getExternalAdmissionHookConfiguration(
|
||||
[]admissionregistration.ExternalAdmissionHook{
|
||||
{
|
||||
Name: "webhook.k8s.io",
|
||||
ClientConfig: admissionregistration.AdmissionHookClientConfig{
|
||||
URLPath: "/foo",
|
||||
},
|
||||
},
|
||||
}),
|
||||
expectedError: ``,
|
||||
},
|
||||
{
|
||||
name: "URLPath fails //",
|
||||
config: getExternalAdmissionHookConfiguration(
|
||||
[]admissionregistration.ExternalAdmissionHook{
|
||||
{
|
||||
Name: "webhook.k8s.io",
|
||||
ClientConfig: admissionregistration.AdmissionHookClientConfig{
|
||||
URLPath: "//",
|
||||
},
|
||||
},
|
||||
}),
|
||||
expectedError: `clientConfig.urlPath: Invalid value: "//": segment[0] may not be empty`,
|
||||
},
|
||||
{
|
||||
name: "URLPath no empty step",
|
||||
config: getExternalAdmissionHookConfiguration(
|
||||
[]admissionregistration.ExternalAdmissionHook{
|
||||
{
|
||||
Name: "webhook.k8s.io",
|
||||
ClientConfig: admissionregistration.AdmissionHookClientConfig{
|
||||
URLPath: "/foo//bar/",
|
||||
},
|
||||
},
|
||||
}),
|
||||
expectedError: `clientConfig.urlPath: Invalid value: "/foo//bar/": segment[1] may not be empty`,
|
||||
}, {
|
||||
name: "URLPath no empty step 2",
|
||||
config: getExternalAdmissionHookConfiguration(
|
||||
[]admissionregistration.ExternalAdmissionHook{
|
||||
{
|
||||
Name: "webhook.k8s.io",
|
||||
ClientConfig: admissionregistration.AdmissionHookClientConfig{
|
||||
URLPath: "/foo/bar//",
|
||||
},
|
||||
},
|
||||
}),
|
||||
expectedError: `clientConfig.urlPath: Invalid value: "/foo/bar//": segment[2] may not be empty`,
|
||||
},
|
||||
{
|
||||
name: "URLPath no non-subdomain",
|
||||
config: getExternalAdmissionHookConfiguration(
|
||||
[]admissionregistration.ExternalAdmissionHook{
|
||||
{
|
||||
Name: "webhook.k8s.io",
|
||||
ClientConfig: admissionregistration.AdmissionHookClientConfig{
|
||||
URLPath: "/apis/foo.bar/v1alpha1/--bad",
|
||||
},
|
||||
},
|
||||
}),
|
||||
expectedError: `clientConfig.urlPath: Invalid value: "/apis/foo.bar/v1alpha1/--bad": segment[3]: a DNS-1123 subdomain`,
|
||||
},
|
||||
}
|
||||
for _, test := range tests {
|
||||
errs := ValidateExternalAdmissionHookConfiguration(test.config)
|
||||
err := errs.ToAggregate()
|
||||
if err != nil {
|
||||
if e, a := test.expectedError, err.Error(); !strings.Contains(a, e) || e == "" {
|
||||
t.Errorf("test case %s, expected to contain %s, got %s", test.name, e, a)
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
errs := ValidateExternalAdmissionHookConfiguration(test.config)
|
||||
err := errs.ToAggregate()
|
||||
if err != nil {
|
||||
if e, a := test.expectedError, err.Error(); !strings.Contains(a, e) || e == "" {
|
||||
t.Errorf("expected to contain %s, got %s", e, a)
|
||||
}
|
||||
} else {
|
||||
if test.expectedError != "" {
|
||||
t.Errorf("unexpected no error, expected to contain %s", test.expectedError)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if test.expectedError != "" {
|
||||
t.Errorf("test case %s, unexpected no error, expected to contain %s", test.name, test.expectedError)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -158,6 +158,7 @@ type ProxyMode string
|
||||
const (
|
||||
ProxyModeUserspace ProxyMode = "userspace"
|
||||
ProxyModeIPTables ProxyMode = "iptables"
|
||||
ProxyModeIPVS ProxyMode = "ipvs"
|
||||
)
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
@@ -16,7 +16,6 @@ go_library(
|
||||
deps = [
|
||||
"//pkg/apis/admissionregistration:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
"//vendor/k8s.io/client-go/tools/cache:go_default_library",
|
||||
],
|
||||
|
@@ -20,7 +20,6 @@ package internalversion
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
admissionregistration "k8s.io/kubernetes/pkg/apis/admissionregistration"
|
||||
@@ -55,8 +54,7 @@ func (s *externalAdmissionHookConfigurationLister) List(selector labels.Selector
|
||||
|
||||
// Get retrieves the ExternalAdmissionHookConfiguration from the index for a given name.
|
||||
func (s *externalAdmissionHookConfigurationLister) Get(name string) (*admissionregistration.ExternalAdmissionHookConfiguration, error) {
|
||||
key := &admissionregistration.ExternalAdmissionHookConfiguration{ObjectMeta: v1.ObjectMeta{Name: name}}
|
||||
obj, exists, err := s.indexer.Get(key)
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@@ -20,7 +20,6 @@ package internalversion
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
admissionregistration "k8s.io/kubernetes/pkg/apis/admissionregistration"
|
||||
@@ -55,8 +54,7 @@ func (s *initializerConfigurationLister) List(selector labels.Selector) (ret []*
|
||||
|
||||
// Get retrieves the InitializerConfiguration from the index for a given name.
|
||||
func (s *initializerConfigurationLister) Get(name string) (*admissionregistration.InitializerConfiguration, error) {
|
||||
key := &admissionregistration.InitializerConfiguration{ObjectMeta: v1.ObjectMeta{Name: name}}
|
||||
obj, exists, err := s.indexer.Get(key)
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@@ -15,7 +15,6 @@ go_library(
|
||||
deps = [
|
||||
"//pkg/apis/authentication:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
"//vendor/k8s.io/client-go/tools/cache:go_default_library",
|
||||
],
|
||||
|
@@ -20,7 +20,6 @@ package internalversion
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
authentication "k8s.io/kubernetes/pkg/apis/authentication"
|
||||
@@ -55,8 +54,7 @@ func (s *tokenReviewLister) List(selector labels.Selector) (ret []*authenticatio
|
||||
|
||||
// Get retrieves the TokenReview from the index for a given name.
|
||||
func (s *tokenReviewLister) Get(name string) (*authentication.TokenReview, error) {
|
||||
key := &authentication.TokenReview{ObjectMeta: v1.ObjectMeta{Name: name}}
|
||||
obj, exists, err := s.indexer.Get(key)
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@@ -18,7 +18,6 @@ go_library(
|
||||
deps = [
|
||||
"//pkg/apis/authorization:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
"//vendor/k8s.io/client-go/tools/cache:go_default_library",
|
||||
],
|
||||
|
@@ -20,7 +20,6 @@ package internalversion
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
authorization "k8s.io/kubernetes/pkg/apis/authorization"
|
||||
@@ -55,8 +54,7 @@ func (s *selfSubjectAccessReviewLister) List(selector labels.Selector) (ret []*a
|
||||
|
||||
// Get retrieves the SelfSubjectAccessReview from the index for a given name.
|
||||
func (s *selfSubjectAccessReviewLister) Get(name string) (*authorization.SelfSubjectAccessReview, error) {
|
||||
key := &authorization.SelfSubjectAccessReview{ObjectMeta: v1.ObjectMeta{Name: name}}
|
||||
obj, exists, err := s.indexer.Get(key)
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@@ -20,7 +20,6 @@ package internalversion
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
authorization "k8s.io/kubernetes/pkg/apis/authorization"
|
||||
@@ -55,8 +54,7 @@ func (s *selfSubjectRulesReviewLister) List(selector labels.Selector) (ret []*au
|
||||
|
||||
// Get retrieves the SelfSubjectRulesReview from the index for a given name.
|
||||
func (s *selfSubjectRulesReviewLister) Get(name string) (*authorization.SelfSubjectRulesReview, error) {
|
||||
key := &authorization.SelfSubjectRulesReview{ObjectMeta: v1.ObjectMeta{Name: name}}
|
||||
obj, exists, err := s.indexer.Get(key)
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@@ -20,7 +20,6 @@ package internalversion
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
authorization "k8s.io/kubernetes/pkg/apis/authorization"
|
||||
@@ -55,8 +54,7 @@ func (s *subjectAccessReviewLister) List(selector labels.Selector) (ret []*autho
|
||||
|
||||
// Get retrieves the SubjectAccessReview from the index for a given name.
|
||||
func (s *subjectAccessReviewLister) Get(name string) (*authorization.SubjectAccessReview, error) {
|
||||
key := &authorization.SubjectAccessReview{ObjectMeta: v1.ObjectMeta{Name: name}}
|
||||
obj, exists, err := s.indexer.Get(key)
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@@ -15,7 +15,6 @@ go_library(
|
||||
deps = [
|
||||
"//pkg/apis/certificates:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
"//vendor/k8s.io/client-go/tools/cache:go_default_library",
|
||||
],
|
||||
|
@@ -20,7 +20,6 @@ package internalversion
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
certificates "k8s.io/kubernetes/pkg/apis/certificates"
|
||||
@@ -55,8 +54,7 @@ func (s *certificateSigningRequestLister) List(selector labels.Selector) (ret []
|
||||
|
||||
// Get retrieves the CertificateSigningRequest from the index for a given name.
|
||||
func (s *certificateSigningRequestLister) Get(name string) (*certificates.CertificateSigningRequest, error) {
|
||||
key := &certificates.CertificateSigningRequest{ObjectMeta: v1.ObjectMeta{Name: name}}
|
||||
obj, exists, err := s.indexer.Get(key)
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@@ -33,7 +33,6 @@ go_library(
|
||||
deps = [
|
||||
"//pkg/api:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
"//vendor/k8s.io/client-go/tools/cache:go_default_library",
|
||||
],
|
||||
|
@@ -20,7 +20,6 @@ package internalversion
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
@@ -55,8 +54,7 @@ func (s *componentStatusLister) List(selector labels.Selector) (ret []*api.Compo
|
||||
|
||||
// Get retrieves the ComponentStatus from the index for a given name.
|
||||
func (s *componentStatusLister) Get(name string) (*api.ComponentStatus, error) {
|
||||
key := &api.ComponentStatus{ObjectMeta: v1.ObjectMeta{Name: name}}
|
||||
obj, exists, err := s.indexer.Get(key)
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@@ -20,7 +20,6 @@ package internalversion
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
@@ -55,8 +54,7 @@ func (s *namespaceLister) List(selector labels.Selector) (ret []*api.Namespace,
|
||||
|
||||
// Get retrieves the Namespace from the index for a given name.
|
||||
func (s *namespaceLister) Get(name string) (*api.Namespace, error) {
|
||||
key := &api.Namespace{ObjectMeta: v1.ObjectMeta{Name: name}}
|
||||
obj, exists, err := s.indexer.Get(key)
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@@ -20,7 +20,6 @@ package internalversion
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
@@ -55,8 +54,7 @@ func (s *nodeLister) List(selector labels.Selector) (ret []*api.Node, err error)
|
||||
|
||||
// Get retrieves the Node from the index for a given name.
|
||||
func (s *nodeLister) Get(name string) (*api.Node, error) {
|
||||
key := &api.Node{ObjectMeta: v1.ObjectMeta{Name: name}}
|
||||
obj, exists, err := s.indexer.Get(key)
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@@ -20,7 +20,6 @@ package internalversion
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
@@ -55,8 +54,7 @@ func (s *persistentVolumeLister) List(selector labels.Selector) (ret []*api.Pers
|
||||
|
||||
// Get retrieves the PersistentVolume from the index for a given name.
|
||||
func (s *persistentVolumeLister) Get(name string) (*api.PersistentVolume, error) {
|
||||
key := &api.PersistentVolume{ObjectMeta: v1.ObjectMeta{Name: name}}
|
||||
obj, exists, err := s.indexer.Get(key)
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@@ -20,7 +20,6 @@ package internalversion
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
extensions "k8s.io/kubernetes/pkg/apis/extensions"
|
||||
@@ -55,8 +54,7 @@ func (s *podSecurityPolicyLister) List(selector labels.Selector) (ret []*extensi
|
||||
|
||||
// Get retrieves the PodSecurityPolicy from the index for a given name.
|
||||
func (s *podSecurityPolicyLister) Get(name string) (*extensions.PodSecurityPolicy, error) {
|
||||
key := &extensions.PodSecurityPolicy{ObjectMeta: v1.ObjectMeta{Name: name}}
|
||||
obj, exists, err := s.indexer.Get(key)
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@@ -20,7 +20,6 @@ package internalversion
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
extensions "k8s.io/kubernetes/pkg/apis/extensions"
|
||||
@@ -55,8 +54,7 @@ func (s *thirdPartyResourceLister) List(selector labels.Selector) (ret []*extens
|
||||
|
||||
// Get retrieves the ThirdPartyResource from the index for a given name.
|
||||
func (s *thirdPartyResourceLister) Get(name string) (*extensions.ThirdPartyResource, error) {
|
||||
key := &extensions.ThirdPartyResource{ObjectMeta: v1.ObjectMeta{Name: name}}
|
||||
obj, exists, err := s.indexer.Get(key)
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@@ -15,7 +15,6 @@ go_library(
|
||||
deps = [
|
||||
"//pkg/apis/imagepolicy:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
"//vendor/k8s.io/client-go/tools/cache:go_default_library",
|
||||
],
|
||||
|
@@ -20,7 +20,6 @@ package internalversion
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
imagepolicy "k8s.io/kubernetes/pkg/apis/imagepolicy"
|
||||
@@ -55,8 +54,7 @@ func (s *imageReviewLister) List(selector labels.Selector) (ret []*imagepolicy.I
|
||||
|
||||
// Get retrieves the ImageReview from the index for a given name.
|
||||
func (s *imageReviewLister) Get(name string) (*imagepolicy.ImageReview, error) {
|
||||
key := &imagepolicy.ImageReview{ObjectMeta: v1.ObjectMeta{Name: name}}
|
||||
obj, exists, err := s.indexer.Get(key)
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@@ -18,7 +18,6 @@ go_library(
|
||||
deps = [
|
||||
"//pkg/apis/rbac:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
"//vendor/k8s.io/client-go/tools/cache:go_default_library",
|
||||
],
|
||||
|
@@ -20,7 +20,6 @@ package internalversion
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
rbac "k8s.io/kubernetes/pkg/apis/rbac"
|
||||
@@ -55,8 +54,7 @@ func (s *clusterRoleLister) List(selector labels.Selector) (ret []*rbac.ClusterR
|
||||
|
||||
// Get retrieves the ClusterRole from the index for a given name.
|
||||
func (s *clusterRoleLister) Get(name string) (*rbac.ClusterRole, error) {
|
||||
key := &rbac.ClusterRole{ObjectMeta: v1.ObjectMeta{Name: name}}
|
||||
obj, exists, err := s.indexer.Get(key)
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@@ -20,7 +20,6 @@ package internalversion
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
rbac "k8s.io/kubernetes/pkg/apis/rbac"
|
||||
@@ -55,8 +54,7 @@ func (s *clusterRoleBindingLister) List(selector labels.Selector) (ret []*rbac.C
|
||||
|
||||
// Get retrieves the ClusterRoleBinding from the index for a given name.
|
||||
func (s *clusterRoleBindingLister) Get(name string) (*rbac.ClusterRoleBinding, error) {
|
||||
key := &rbac.ClusterRoleBinding{ObjectMeta: v1.ObjectMeta{Name: name}}
|
||||
obj, exists, err := s.indexer.Get(key)
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@@ -15,7 +15,6 @@ go_library(
|
||||
deps = [
|
||||
"//pkg/apis/scheduling:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
"//vendor/k8s.io/client-go/tools/cache:go_default_library",
|
||||
],
|
||||
|
@@ -20,7 +20,6 @@ package internalversion
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
scheduling "k8s.io/kubernetes/pkg/apis/scheduling"
|
||||
@@ -55,8 +54,7 @@ func (s *priorityClassLister) List(selector labels.Selector) (ret []*scheduling.
|
||||
|
||||
// Get retrieves the PriorityClass from the index for a given name.
|
||||
func (s *priorityClassLister) Get(name string) (*scheduling.PriorityClass, error) {
|
||||
key := &scheduling.PriorityClass{ObjectMeta: v1.ObjectMeta{Name: name}}
|
||||
obj, exists, err := s.indexer.Get(key)
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@@ -15,7 +15,6 @@ go_library(
|
||||
deps = [
|
||||
"//pkg/apis/storage:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
"//vendor/k8s.io/client-go/tools/cache:go_default_library",
|
||||
],
|
||||
|
@@ -20,7 +20,6 @@ package internalversion
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
storage "k8s.io/kubernetes/pkg/apis/storage"
|
||||
@@ -55,8 +54,7 @@ func (s *storageClassLister) List(selector labels.Selector) (ret []*storage.Stor
|
||||
|
||||
// Get retrieves the StorageClass from the index for a given name.
|
||||
func (s *storageClassLister) Get(name string) (*storage.StorageClass, error) {
|
||||
key := &storage.StorageClass{ObjectMeta: v1.ObjectMeta{Name: name}}
|
||||
obj, exists, err := s.indexer.Get(key)
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@@ -186,7 +186,6 @@ type Controller struct {
|
||||
cidrAllocator ipam.CIDRAllocator
|
||||
taintManager *scheduler.NoExecuteTaintManager
|
||||
|
||||
forcefullyDeletePod func(*v1.Pod) error
|
||||
nodeExistsInCloudProvider func(types.NodeName) (bool, error)
|
||||
computeZoneStateFunc func(nodeConditions []*v1.NodeCondition) (int, ZoneState)
|
||||
enterPartialDisruptionFunc func(nodeNum int) float32
|
||||
@@ -285,9 +284,6 @@ func NewNodeController(
|
||||
serviceCIDR: serviceCIDR,
|
||||
allocateNodeCIDRs: allocateNodeCIDRs,
|
||||
allocatorType: allocatorType,
|
||||
forcefullyDeletePod: func(p *v1.Pod) error {
|
||||
return util.ForcefullyDeletePod(kubeClient, p)
|
||||
},
|
||||
nodeExistsInCloudProvider: func(nodeName types.NodeName) (bool, error) {
|
||||
return util.NodeExistsInCloudProvider(cloud, nodeName)
|
||||
},
|
||||
|
@@ -129,17 +129,6 @@ func SetPodTerminationReason(kubeClient clientset.Interface, pod *v1.Pod, nodeNa
|
||||
return updatedPod, nil
|
||||
}
|
||||
|
||||
// ForcefullyDeletePod deletes the pod immediately.
|
||||
func ForcefullyDeletePod(c clientset.Interface, pod *v1.Pod) error {
|
||||
var zero int64
|
||||
glog.Infof("NodeController is force deleting Pod: %v:%v", pod.Namespace, pod.Name)
|
||||
err := c.Core().Pods(pod.Namespace).Delete(pod.Name, &metav1.DeleteOptions{GracePeriodSeconds: &zero})
|
||||
if err == nil {
|
||||
glog.V(4).Infof("forceful deletion of %s succeeded", pod.Name)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
// ForcefullyDeleteNode deletes the node immediately. The pods on the
|
||||
// node are cleaned up by the podGC.
|
||||
func ForcefullyDeleteNode(kubeClient clientset.Interface, nodeName string) error {
|
||||
|
@@ -88,6 +88,7 @@ func NewHorizontalController(
|
||||
|
||||
) *HorizontalController {
|
||||
broadcaster := record.NewBroadcaster()
|
||||
broadcaster.StartLogging(glog.Infof)
|
||||
// TODO: remove the wrapper when every clients have moved to use the clientset.
|
||||
broadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: evtNamespacer.Events("")})
|
||||
recorder := broadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "horizontal-pod-autoscaler"})
|
||||
|
@@ -66,8 +66,8 @@ type RouteController struct {
|
||||
}
|
||||
|
||||
func New(routes cloudprovider.Routes, kubeClient clientset.Interface, nodeInformer coreinformers.NodeInformer, clusterName string, clusterCIDR *net.IPNet) *RouteController {
|
||||
if kubeClient != nil && kubeClient.Core().RESTClient().GetRateLimiter() != nil {
|
||||
metrics.RegisterMetricAndTrackRateLimiterUsage("route_controller", kubeClient.Core().RESTClient().GetRateLimiter())
|
||||
if kubeClient != nil && kubeClient.CoreV1().RESTClient().GetRateLimiter() != nil {
|
||||
metrics.RegisterMetricAndTrackRateLimiterUsage("route_controller", kubeClient.CoreV1().RESTClient().GetRateLimiter())
|
||||
}
|
||||
|
||||
if clusterCIDR == nil {
|
||||
@@ -75,7 +75,8 @@ func New(routes cloudprovider.Routes, kubeClient clientset.Interface, nodeInform
|
||||
}
|
||||
|
||||
eventBroadcaster := record.NewBroadcaster()
|
||||
recorder := eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "route-controller"})
|
||||
eventBroadcaster.StartLogging(glog.Infof)
|
||||
recorder := eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "route_controller"})
|
||||
|
||||
rc := &RouteController{
|
||||
routes: routes,
|
||||
@@ -114,7 +115,7 @@ func (rc *RouteController) Run(stopCh <-chan struct{}, syncPeriod time.Duration)
|
||||
if err := rc.reconcileNodeRoutes(); err != nil {
|
||||
glog.Errorf("Couldn't reconcile node routes: %v", err)
|
||||
}
|
||||
}, syncPeriod, wait.NeverStop)
|
||||
}, syncPeriod, stopCh)
|
||||
|
||||
<-stopCh
|
||||
}
|
||||
@@ -254,7 +255,7 @@ func (rc *RouteController) updateNetworkingCondition(nodeName types.NodeName, ro
|
||||
glog.Errorf("Error updating node %s: %v", nodeName, err)
|
||||
return err
|
||||
}
|
||||
glog.Errorf("Error updating node %s, retrying: %v", nodeName, err)
|
||||
glog.V(4).Infof("Error updating node %s, retrying: %v", nodeName, err)
|
||||
}
|
||||
glog.Errorf("Error updating node %s: %v", nodeName, err)
|
||||
return err
|
||||
|
@@ -112,6 +112,7 @@ func New(
|
||||
clusterName string,
|
||||
) (*ServiceController, error) {
|
||||
broadcaster := record.NewBroadcaster()
|
||||
broadcaster.StartLogging(glog.Infof)
|
||||
broadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: v1core.New(kubeClient.Core().RESTClient()).Events("")})
|
||||
recorder := broadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "service-controller"})
|
||||
broadcaster.StartLogging(glog.Infof)
|
||||
|
@@ -475,7 +475,6 @@ func (asw *actualStateOfWorld) updateNodeStatusUpdateNeeded(nodeName types.NodeN
|
||||
// should not happen
|
||||
errMsg := fmt.Sprintf("Failed to set statusUpdateNeeded to needed %t because nodeName=%q does not exist",
|
||||
needed, nodeName)
|
||||
glog.Errorf(errMsg)
|
||||
return fmt.Errorf(errMsg)
|
||||
}
|
||||
|
||||
|
@@ -70,6 +70,7 @@ func NewController(p ControllerParameters) (*PersistentVolumeController, error)
|
||||
eventRecorder := p.EventRecorder
|
||||
if eventRecorder == nil {
|
||||
broadcaster := record.NewBroadcaster()
|
||||
broadcaster.StartLogging(glog.Infof)
|
||||
broadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: v1core.New(p.KubeClient.Core().RESTClient()).Events("")})
|
||||
eventRecorder = broadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "persistentvolume-controller"})
|
||||
}
|
||||
|
@@ -17,7 +17,6 @@ limitations under the License.
|
||||
package admission
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
||||
"k8s.io/apimachinery/pkg/api/meta"
|
||||
@@ -71,12 +70,6 @@ type ServiceResolver interface {
|
||||
ResolveEndpoint(namespace, name string) (*url.URL, error)
|
||||
}
|
||||
|
||||
// WantsProxyTransport defines a fuction that accepts a proxy transport for admission
|
||||
// plugins that need to make calls to pods.
|
||||
type WantsProxyTransport interface {
|
||||
SetProxyTransport(proxyTransport *http.Transport)
|
||||
}
|
||||
|
||||
type PluginInitializer struct {
|
||||
internalClient internalclientset.Interface
|
||||
externalClient clientset.Interface
|
||||
@@ -86,9 +79,6 @@ type PluginInitializer struct {
|
||||
restMapper meta.RESTMapper
|
||||
quotaRegistry quota.Registry
|
||||
serviceResolver ServiceResolver
|
||||
|
||||
// for proving we are apiserver in call-outs
|
||||
proxyTransport *http.Transport
|
||||
}
|
||||
|
||||
var _ admission.PluginInitializer = &PluginInitializer{}
|
||||
@@ -118,12 +108,6 @@ func (i *PluginInitializer) SetServiceResolver(s ServiceResolver) *PluginInitial
|
||||
return i
|
||||
}
|
||||
|
||||
// SetProxyTransport sets the proxyTransport which is needed by some plugins.
|
||||
func (i *PluginInitializer) SetProxyTransport(proxyTransport *http.Transport) *PluginInitializer {
|
||||
i.proxyTransport = proxyTransport
|
||||
return i
|
||||
}
|
||||
|
||||
// Initialize checks the initialization interfaces implemented by each plugin
|
||||
// and provide the appropriate initialization data
|
||||
func (i *PluginInitializer) Initialize(plugin admission.Interface) {
|
||||
@@ -150,8 +134,4 @@ func (i *PluginInitializer) Initialize(plugin admission.Interface) {
|
||||
if wants, ok := plugin.(WantsServiceResolver); ok {
|
||||
wants.SetServiceResolver(i.serviceResolver)
|
||||
}
|
||||
|
||||
if wants, ok := plugin.(WantsProxyTransport); ok {
|
||||
wants.SetProxyTransport(i.proxyTransport)
|
||||
}
|
||||
}
|
||||
|
@@ -23,7 +23,9 @@ import (
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"k8s.io/apimachinery/pkg/api/meta"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
|
||||
"k8s.io/kubernetes/pkg/kubectl"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
|
||||
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
|
||||
@@ -242,7 +244,7 @@ type CreateSubcommandOptions struct {
|
||||
|
||||
// RunCreateSubcommand executes a create subcommand using the specified options
|
||||
func RunCreateSubcommand(f cmdutil.Factory, cmd *cobra.Command, out io.Writer, options *CreateSubcommandOptions) error {
|
||||
namespace, _, err := f.DefaultNamespace()
|
||||
namespace, nsOverriden, err := f.DefaultNamespace()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -283,6 +285,10 @@ func RunCreateSubcommand(f cmdutil.Factory, cmd *cobra.Command, out io.Writer, o
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
if meta, err := meta.Accessor(obj); err == nil && nsOverriden {
|
||||
meta.SetNamespace(namespace)
|
||||
}
|
||||
}
|
||||
|
||||
if useShortOutput := options.OutputFormat == "name"; useShortOutput || len(options.OutputFormat) == 0 {
|
||||
|
@@ -169,6 +169,7 @@ func NewCmdCreateSecretDockerRegistry(f cmdutil.Factory, cmdOut io.Writer) *cobr
|
||||
cmd.Flags().String("docker-email", "", i18n.T("Email for Docker registry"))
|
||||
cmd.Flags().String("docker-server", "https://index.docker.io/v1/", i18n.T("Server location for Docker registry"))
|
||||
cmd.Flags().Bool("append-hash", false, "Append a hash of the secret to its name.")
|
||||
|
||||
cmdutil.AddInclude3rdPartyFlags(cmd)
|
||||
return cmd
|
||||
}
|
||||
|
@@ -47,13 +47,13 @@ func NewCmdCreateService(f cmdutil.Factory, cmdOut, errOut io.Writer) *cobra.Com
|
||||
|
||||
var (
|
||||
serviceClusterIPLong = templates.LongDesc(i18n.T(`
|
||||
Create a clusterIP service with the specified name.`))
|
||||
Create a ClusterIP service with the specified name.`))
|
||||
|
||||
serviceClusterIPExample = templates.Examples(i18n.T(`
|
||||
# Create a new clusterIP service named my-cs
|
||||
# Create a new ClusterIP service named my-cs
|
||||
kubectl create service clusterip my-cs --tcp=5678:8080
|
||||
|
||||
# Create a new clusterIP service named my-cs (in headless mode)
|
||||
# Create a new ClusterIP service named my-cs (in headless mode)
|
||||
kubectl create service clusterip my-cs --clusterip="None"`))
|
||||
)
|
||||
|
||||
@@ -61,11 +61,11 @@ func addPortFlags(cmd *cobra.Command) {
|
||||
cmd.Flags().StringSlice("tcp", []string{}, "Port pairs can be specified as '<port>:<targetPort>'.")
|
||||
}
|
||||
|
||||
// NewCmdCreateServiceClusterIP is a command to create a clusterIP service
|
||||
// NewCmdCreateServiceClusterIP is a command to create a ClusterIP service
|
||||
func NewCmdCreateServiceClusterIP(f cmdutil.Factory, cmdOut io.Writer) *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "clusterip NAME [--tcp=<port>:<targetPort>] [--dry-run]",
|
||||
Short: i18n.T("Create a clusterIP service."),
|
||||
Short: i18n.T("Create a ClusterIP service."),
|
||||
Long: serviceClusterIPLong,
|
||||
Example: serviceClusterIPExample,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
@@ -86,7 +86,7 @@ func errUnsupportedGenerator(cmd *cobra.Command, generatorName string) error {
|
||||
return cmdutil.UsageErrorf(cmd, "Generator %s not supported. ", generatorName)
|
||||
}
|
||||
|
||||
// CreateServiceClusterIP implements the behavior to run the create service clusterIP command
|
||||
// CreateServiceClusterIP is the implementation of the create service clusterip command
|
||||
func CreateServiceClusterIP(f cmdutil.Factory, cmdOut io.Writer, cmd *cobra.Command, args []string) error {
|
||||
name, err := NameFromCommandArgs(cmd, args)
|
||||
if err != nil {
|
||||
@@ -114,10 +114,10 @@ func CreateServiceClusterIP(f cmdutil.Factory, cmdOut io.Writer, cmd *cobra.Comm
|
||||
|
||||
var (
|
||||
serviceNodePortLong = templates.LongDesc(i18n.T(`
|
||||
Create a nodeport service with the specified name.`))
|
||||
Create a NodePort service with the specified name.`))
|
||||
|
||||
serviceNodePortExample = templates.Examples(i18n.T(`
|
||||
# Create a new nodeport service named my-ns
|
||||
# Create a new NodePort service named my-ns
|
||||
kubectl create service nodeport my-ns --tcp=5678:8080`))
|
||||
)
|
||||
|
||||
@@ -198,7 +198,7 @@ func NewCmdCreateServiceLoadBalancer(f cmdutil.Factory, cmdOut io.Writer) *cobra
|
||||
return cmd
|
||||
}
|
||||
|
||||
// CreateServiceLoadBalancer is the implementation of the service loadbalancer command
|
||||
// CreateServiceLoadBalancer is the implementation of the create service loadbalancer command
|
||||
func CreateServiceLoadBalancer(f cmdutil.Factory, cmdOut io.Writer, cmd *cobra.Command, args []string) error {
|
||||
name, err := NameFromCommandArgs(cmd, args)
|
||||
if err != nil {
|
||||
@@ -237,7 +237,7 @@ var (
|
||||
kubectl create service externalname my-ns --external-name bar.com`))
|
||||
)
|
||||
|
||||
// NewCmdCreateServiceExternalName is a macro command for creating a ExternalName service
|
||||
// NewCmdCreateServiceExternalName is a macro command for creating an ExternalName service
|
||||
func NewCmdCreateServiceExternalName(f cmdutil.Factory, cmdOut io.Writer) *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "externalname NAME --external-name external.name [--dry-run]",
|
||||
@@ -259,7 +259,7 @@ func NewCmdCreateServiceExternalName(f cmdutil.Factory, cmdOut io.Writer) *cobra
|
||||
return cmd
|
||||
}
|
||||
|
||||
// CreateExternalNameService is the implementation of the service externalname command
|
||||
// CreateExternalNameService is the implementation of the create service externalname command
|
||||
func CreateExternalNameService(f cmdutil.Factory, cmdOut io.Writer, cmd *cobra.Command, args []string) error {
|
||||
name, err := NameFromCommandArgs(cmd, args)
|
||||
if err != nil {
|
||||
|
@@ -98,7 +98,7 @@ func NewCmdExposeService(f cmdutil.Factory, out io.Writer) *cobra.Command {
|
||||
cmd.Flags().String("generator", "service/v2", i18n.T("The name of the API generator to use. There are 2 generators: 'service/v1' and 'service/v2'. The only difference between them is that service port in v1 is named 'default', while it is left unnamed in v2. Default is 'service/v2'."))
|
||||
cmd.Flags().String("protocol", "", i18n.T("The network protocol for the service to be created. Default is 'TCP'."))
|
||||
cmd.Flags().String("port", "", i18n.T("The port that the service should serve on. Copied from the resource being exposed, if unspecified"))
|
||||
cmd.Flags().String("type", "", i18n.T("Type for this service: ClusterIP, NodePort, or LoadBalancer. Default is 'ClusterIP'."))
|
||||
cmd.Flags().String("type", "", i18n.T("Type for this service: ClusterIP, NodePort, LoadBalancer, or ExternalName. Default is 'ClusterIP'."))
|
||||
cmd.Flags().String("load-balancer-ip", "", i18n.T("IP to assign to the Load Balancer. If empty, an ephemeral IP will be created and used (cloud-provider specific)."))
|
||||
cmd.Flags().String("selector", "", i18n.T("A label selector to use for this service. Only equality-based selector requirements are supported. If empty (the default) infer the selector from the replication controller or replica set.)"))
|
||||
cmd.Flags().StringP("labels", "l", "", "Labels to apply to the service created by this call.")
|
||||
|
@@ -335,4 +335,63 @@ items:
|
||||
|
||||
Expect(err).To(BeNil())
|
||||
})
|
||||
|
||||
It("fails because apiVersion is not provided", func() {
|
||||
err := validator.ValidateBytes([]byte(`
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: name
|
||||
spec:
|
||||
containers:
|
||||
- name: name
|
||||
image: image
|
||||
`))
|
||||
Expect(err.Error()).To(Equal("apiVersion not set"))
|
||||
})
|
||||
|
||||
It("fails because apiVersion type is not string and kind is not provided", func() {
|
||||
err := validator.ValidateBytes([]byte(`
|
||||
apiVersion: 1
|
||||
metadata:
|
||||
name: name
|
||||
spec:
|
||||
containers:
|
||||
- name: name
|
||||
image: image
|
||||
`))
|
||||
Expect(err.Error()).To(Equal("[apiVersion isn't string type, kind not set]"))
|
||||
})
|
||||
|
||||
It("fails because List first item is missing kind and second item is missing apiVersion", func() {
|
||||
err := validator.ValidateBytes([]byte(`
|
||||
apiVersion: v1
|
||||
kind: List
|
||||
items:
|
||||
- apiVersion: v1
|
||||
metadata:
|
||||
name: name
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
name: name
|
||||
spec:
|
||||
containers:
|
||||
- name: name
|
||||
image: image
|
||||
- kind: Service
|
||||
metadata:
|
||||
name: name
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 123
|
||||
targetPort: 1234
|
||||
name: name
|
||||
selector:
|
||||
name: name
|
||||
`))
|
||||
Expect(err.Error()).To(Equal("[kind not set, apiVersion not set]"))
|
||||
})
|
||||
})
|
||||
|
@@ -141,7 +141,9 @@ func handleDockercfgContent(username, password, email, server string) ([]byte, e
|
||||
Email: email,
|
||||
}
|
||||
|
||||
dockerCfg := map[string]credentialprovider.DockerConfigEntry{server: dockercfgAuth}
|
||||
dockerCfg := credentialprovider.DockerConfigJson{
|
||||
Auths: map[string]credentialprovider.DockerConfigEntry{server: dockercfgAuth},
|
||||
}
|
||||
|
||||
return json.Marshal(dockerCfg)
|
||||
}
|
||||
|
@@ -70,7 +70,7 @@ func TestSecretForDockerRegistryGenerate(t *testing.T) {
|
||||
},
|
||||
expected: &api.Secret{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "foo-gb4kftc655",
|
||||
Name: "foo-94759gc65b",
|
||||
},
|
||||
Data: map[string][]byte{
|
||||
api.DockerConfigKey: secretData,
|
||||
|
@@ -135,7 +135,7 @@ func generate(genericParams map[string]interface{}) (runtime.Object, error) {
|
||||
if portString, found = params["ports"]; !found {
|
||||
portString, found = params["port"]
|
||||
if !found && !isHeadlessService {
|
||||
return nil, fmt.Errorf("'port' is a required parameter.")
|
||||
return nil, fmt.Errorf("'ports' or 'port' is a required parameter.")
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,7 @@ filegroup(
|
||||
srcs = [
|
||||
":package-srcs",
|
||||
"//pkg/kubelet/apis/cri:all-srcs",
|
||||
"//pkg/kubelet/apis/deviceplugin/v1alpha1:all-srcs",
|
||||
"//pkg/kubelet/apis/deviceplugin/v1alpha:all-srcs",
|
||||
"//pkg/kubelet/apis/kubeletconfig:all-srcs",
|
||||
"//pkg/kubelet/apis/stats/v1alpha1:all-srcs",
|
||||
],
|
||||
|
@@ -11,7 +11,7 @@ go_library(
|
||||
"api.pb.go",
|
||||
"constants.go",
|
||||
],
|
||||
importpath = "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1alpha1",
|
||||
importpath = "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1alpha",
|
||||
deps = [
|
||||
"//vendor/github.com/gogo/protobuf/gogoproto:go_default_library",
|
||||
"//vendor/github.com/gogo/protobuf/proto:go_default_library",
|
@@ -31,7 +31,6 @@ limitations under the License.
|
||||
Device
|
||||
AllocateRequest
|
||||
AllocateResponse
|
||||
DeviceRuntimeSpec
|
||||
Mount
|
||||
DeviceSpec
|
||||
*/
|
||||
@@ -177,64 +176,42 @@ func (m *AllocateRequest) GetDevicesIDs() []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
// AllocateResponse includes the artifacts that needs to be injected into
|
||||
// a container for accessing 'deviceIDs' that were mentioned as part of
|
||||
// 'AllocateRequest'.
|
||||
// Failure Handling:
|
||||
// if Kubelet sends an allocation request for dev1 and dev2.
|
||||
// Allocation on dev1 succeeds but allocation on dev2 fails.
|
||||
// The Device plugin should send a ListAndWatch update and fail the
|
||||
// Allocation request
|
||||
type AllocateResponse struct {
|
||||
Spec []*DeviceRuntimeSpec `protobuf:"bytes,1,rep,name=spec" json:"spec,omitempty"`
|
||||
// List of environment variable to be set in the container to access one of more devices.
|
||||
Envs map[string]string `protobuf:"bytes,1,rep,name=envs" json:"envs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
// Mounts for the container.
|
||||
Mounts []*Mount `protobuf:"bytes,2,rep,name=mounts" json:"mounts,omitempty"`
|
||||
// Devices for the container.
|
||||
Devices []*DeviceSpec `protobuf:"bytes,3,rep,name=devices" json:"devices,omitempty"`
|
||||
}
|
||||
|
||||
func (m *AllocateResponse) Reset() { *m = AllocateResponse{} }
|
||||
func (*AllocateResponse) ProtoMessage() {}
|
||||
func (*AllocateResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{5} }
|
||||
|
||||
func (m *AllocateResponse) GetSpec() []*DeviceRuntimeSpec {
|
||||
if m != nil {
|
||||
return m.Spec
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// The list to be added to the CRI spec
|
||||
type DeviceRuntimeSpec struct {
|
||||
// ID of the Device
|
||||
ID string `protobuf:"bytes,1,opt,name=ID,json=iD,proto3" json:"ID,omitempty"`
|
||||
// List of environment variable to set in the container.
|
||||
Envs map[string]string `protobuf:"bytes,2,rep,name=envs" json:"envs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
// Mounts for the container.
|
||||
Mounts []*Mount `protobuf:"bytes,3,rep,name=mounts" json:"mounts,omitempty"`
|
||||
// Devices for the container
|
||||
Devices []*DeviceSpec `protobuf:"bytes,4,rep,name=devices" json:"devices,omitempty"`
|
||||
}
|
||||
|
||||
func (m *DeviceRuntimeSpec) Reset() { *m = DeviceRuntimeSpec{} }
|
||||
func (*DeviceRuntimeSpec) ProtoMessage() {}
|
||||
func (*DeviceRuntimeSpec) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{6} }
|
||||
|
||||
func (m *DeviceRuntimeSpec) GetID() string {
|
||||
if m != nil {
|
||||
return m.ID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *DeviceRuntimeSpec) GetEnvs() map[string]string {
|
||||
func (m *AllocateResponse) GetEnvs() map[string]string {
|
||||
if m != nil {
|
||||
return m.Envs
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *DeviceRuntimeSpec) GetMounts() []*Mount {
|
||||
func (m *AllocateResponse) GetMounts() []*Mount {
|
||||
if m != nil {
|
||||
return m.Mounts
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *DeviceRuntimeSpec) GetDevices() []*DeviceSpec {
|
||||
func (m *AllocateResponse) GetDevices() []*DeviceSpec {
|
||||
if m != nil {
|
||||
return m.Devices
|
||||
}
|
||||
@@ -254,7 +231,7 @@ type Mount struct {
|
||||
|
||||
func (m *Mount) Reset() { *m = Mount{} }
|
||||
func (*Mount) ProtoMessage() {}
|
||||
func (*Mount) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{7} }
|
||||
func (*Mount) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{6} }
|
||||
|
||||
func (m *Mount) GetContainerPath() string {
|
||||
if m != nil {
|
||||
@@ -292,7 +269,7 @@ type DeviceSpec struct {
|
||||
|
||||
func (m *DeviceSpec) Reset() { *m = DeviceSpec{} }
|
||||
func (*DeviceSpec) ProtoMessage() {}
|
||||
func (*DeviceSpec) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{8} }
|
||||
func (*DeviceSpec) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{7} }
|
||||
|
||||
func (m *DeviceSpec) GetContainerPath() string {
|
||||
if m != nil {
|
||||
@@ -322,7 +299,6 @@ func init() {
|
||||
proto.RegisterType((*Device)(nil), "deviceplugin.Device")
|
||||
proto.RegisterType((*AllocateRequest)(nil), "deviceplugin.AllocateRequest")
|
||||
proto.RegisterType((*AllocateResponse)(nil), "deviceplugin.AllocateResponse")
|
||||
proto.RegisterType((*DeviceRuntimeSpec)(nil), "deviceplugin.DeviceRuntimeSpec")
|
||||
proto.RegisterType((*Mount)(nil), "deviceplugin.Mount")
|
||||
proto.RegisterType((*DeviceSpec)(nil), "deviceplugin.DeviceSpec")
|
||||
}
|
||||
@@ -698,45 +674,9 @@ func (m *AllocateResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Spec) > 0 {
|
||||
for _, msg := range m.Spec {
|
||||
dAtA[i] = 0xa
|
||||
i++
|
||||
i = encodeVarintApi(dAtA, i, uint64(msg.Size()))
|
||||
n, err := msg.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n
|
||||
}
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
|
||||
func (m *DeviceRuntimeSpec) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalTo(dAtA)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *DeviceRuntimeSpec) MarshalTo(dAtA []byte) (int, error) {
|
||||
var i int
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.ID) > 0 {
|
||||
dAtA[i] = 0xa
|
||||
i++
|
||||
i = encodeVarintApi(dAtA, i, uint64(len(m.ID)))
|
||||
i += copy(dAtA[i:], m.ID)
|
||||
}
|
||||
if len(m.Envs) > 0 {
|
||||
for k := range m.Envs {
|
||||
dAtA[i] = 0x12
|
||||
dAtA[i] = 0xa
|
||||
i++
|
||||
v := m.Envs[k]
|
||||
mapSize := 1 + len(k) + sovApi(uint64(len(k))) + 1 + len(v) + sovApi(uint64(len(v)))
|
||||
@@ -753,7 +693,7 @@ func (m *DeviceRuntimeSpec) MarshalTo(dAtA []byte) (int, error) {
|
||||
}
|
||||
if len(m.Mounts) > 0 {
|
||||
for _, msg := range m.Mounts {
|
||||
dAtA[i] = 0x1a
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
i = encodeVarintApi(dAtA, i, uint64(msg.Size()))
|
||||
n, err := msg.MarshalTo(dAtA[i:])
|
||||
@@ -765,7 +705,7 @@ func (m *DeviceRuntimeSpec) MarshalTo(dAtA []byte) (int, error) {
|
||||
}
|
||||
if len(m.Devices) > 0 {
|
||||
for _, msg := range m.Devices {
|
||||
dAtA[i] = 0x22
|
||||
dAtA[i] = 0x1a
|
||||
i++
|
||||
i = encodeVarintApi(dAtA, i, uint64(msg.Size()))
|
||||
n, err := msg.MarshalTo(dAtA[i:])
|
||||
@@ -946,22 +886,6 @@ func (m *AllocateRequest) Size() (n int) {
|
||||
func (m *AllocateResponse) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Spec) > 0 {
|
||||
for _, e := range m.Spec {
|
||||
l = e.Size()
|
||||
n += 1 + l + sovApi(uint64(l))
|
||||
}
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *DeviceRuntimeSpec) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.ID)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovApi(uint64(l))
|
||||
}
|
||||
if len(m.Envs) > 0 {
|
||||
for k, v := range m.Envs {
|
||||
_ = k
|
||||
@@ -1086,16 +1010,6 @@ func (this *AllocateRequest) String() string {
|
||||
return s
|
||||
}
|
||||
func (this *AllocateResponse) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings.Join([]string{`&AllocateResponse{`,
|
||||
`Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "DeviceRuntimeSpec", "DeviceRuntimeSpec", 1) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *DeviceRuntimeSpec) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
@@ -1109,8 +1023,7 @@ func (this *DeviceRuntimeSpec) String() string {
|
||||
mapStringForEnvs += fmt.Sprintf("%v: %v,", k, this.Envs[k])
|
||||
}
|
||||
mapStringForEnvs += "}"
|
||||
s := strings.Join([]string{`&DeviceRuntimeSpec{`,
|
||||
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
|
||||
s := strings.Join([]string{`&AllocateResponse{`,
|
||||
`Envs:` + mapStringForEnvs + `,`,
|
||||
`Mounts:` + strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "Mount", 1) + `,`,
|
||||
`Devices:` + strings.Replace(fmt.Sprintf("%v", this.Devices), "DeviceSpec", "DeviceSpec", 1) + `,`,
|
||||
@@ -1635,116 +1548,6 @@ func (m *AllocateResponse) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowApi
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= (int(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthApi
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Spec = append(m.Spec, &DeviceRuntimeSpec{})
|
||||
if err := m.Spec[len(m.Spec)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipApi(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthApi
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *DeviceRuntimeSpec) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowApi
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: DeviceRuntimeSpec: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: DeviceRuntimeSpec: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowApi
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthApi
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.ID = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Envs", wireType)
|
||||
}
|
||||
@@ -1860,7 +1663,7 @@ func (m *DeviceRuntimeSpec) Unmarshal(dAtA []byte) error {
|
||||
m.Envs[mapkey] = mapvalue
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Mounts", wireType)
|
||||
}
|
||||
@@ -1891,7 +1694,7 @@ func (m *DeviceRuntimeSpec) Unmarshal(dAtA []byte) error {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 4:
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType)
|
||||
}
|
||||
@@ -2316,42 +2119,41 @@ var (
|
||||
func init() { proto.RegisterFile("api.proto", fileDescriptorApi) }
|
||||
|
||||
var fileDescriptorApi = []byte{
|
||||
// 590 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcd, 0x6e, 0xd3, 0x40,
|
||||
0x10, 0xce, 0x26, 0x6d, 0x9a, 0x4c, 0xd3, 0x1f, 0x96, 0x0a, 0x59, 0x01, 0x4c, 0x65, 0x84, 0x54,
|
||||
0x84, 0x70, 0x4b, 0x7a, 0x00, 0x21, 0x21, 0x51, 0x94, 0x82, 0xaa, 0xf2, 0x53, 0x99, 0x03, 0xc7,
|
||||
0x6a, 0xeb, 0x0c, 0xf1, 0x0a, 0x7b, 0xd7, 0x78, 0xd7, 0x91, 0x72, 0xe3, 0x11, 0x78, 0x0c, 0x1e,
|
||||
0xa5, 0x47, 0x8e, 0x1c, 0x69, 0x78, 0x0d, 0x0e, 0xc8, 0xeb, 0x75, 0x9b, 0xa6, 0x41, 0x5c, 0xb8,
|
||||
0x79, 0xbe, 0xf9, 0x66, 0xe6, 0x9b, 0xcd, 0x7c, 0x81, 0x36, 0x4b, 0xb9, 0x9f, 0x66, 0x52, 0x4b,
|
||||
0xda, 0x19, 0xe0, 0x88, 0x87, 0x98, 0xc6, 0xf9, 0x90, 0x8b, 0xee, 0xc3, 0x21, 0xd7, 0x51, 0x7e,
|
||||
0xe2, 0x87, 0x32, 0xd9, 0x1e, 0xca, 0xa1, 0xdc, 0x36, 0xa4, 0x93, 0xfc, 0xa3, 0x89, 0x4c, 0x60,
|
||||
0xbe, 0xca, 0x62, 0x2f, 0x86, 0xb5, 0x00, 0x87, 0x5c, 0x69, 0xcc, 0x02, 0xfc, 0x9c, 0xa3, 0xd2,
|
||||
0xd4, 0x81, 0xa5, 0x11, 0x66, 0x8a, 0x4b, 0xe1, 0x90, 0x4d, 0xb2, 0xd5, 0x0e, 0xaa, 0x90, 0x76,
|
||||
0xa1, 0x85, 0x62, 0x90, 0x4a, 0x2e, 0xb4, 0x53, 0x37, 0xa9, 0xf3, 0x98, 0xde, 0x85, 0x95, 0x0c,
|
||||
0x95, 0xcc, 0xb3, 0x10, 0x8f, 0x05, 0x4b, 0xd0, 0x69, 0x18, 0x42, 0xa7, 0x02, 0xdf, 0xb2, 0x04,
|
||||
0xbd, 0x25, 0x58, 0xdc, 0x4f, 0x52, 0x3d, 0xf6, 0x5e, 0xc2, 0xc6, 0x6b, 0xae, 0xf4, 0x9e, 0x18,
|
||||
0x7c, 0x60, 0x3a, 0x8c, 0x02, 0x54, 0xa9, 0x14, 0x0a, 0xa9, 0x0f, 0x4b, 0xe5, 0x36, 0xca, 0x21,
|
||||
0x9b, 0x8d, 0xad, 0xe5, 0xde, 0x86, 0x3f, 0xbd, 0x9d, 0xdf, 0x37, 0x41, 0x50, 0x91, 0xbc, 0x1d,
|
||||
0x68, 0x96, 0x10, 0x5d, 0x85, 0xfa, 0x41, 0xdf, 0x0a, 0xae, 0xf3, 0x3e, 0xbd, 0x01, 0xcd, 0x08,
|
||||
0x59, 0xac, 0x23, 0xab, 0xd4, 0x46, 0xde, 0x23, 0x58, 0xdb, 0x8b, 0x63, 0x19, 0x32, 0x8d, 0xd5,
|
||||
0xc2, 0x2e, 0x80, 0xed, 0x77, 0xd0, 0x2f, 0xe7, 0xb6, 0x83, 0x29, 0xc4, 0x7b, 0x05, 0xeb, 0x17,
|
||||
0x25, 0x56, 0xe8, 0x2e, 0x2c, 0xa8, 0x14, 0x43, 0xab, 0xf2, 0xce, 0x5c, 0x95, 0xb9, 0xd0, 0x3c,
|
||||
0xc1, 0xf7, 0x29, 0x86, 0x81, 0x21, 0x7b, 0xbf, 0x09, 0x5c, 0xbb, 0x92, 0xbb, 0xa2, 0xfc, 0x19,
|
||||
0x2c, 0xa0, 0x18, 0x29, 0xa7, 0x6e, 0x5a, 0xdf, 0xff, 0x47, 0x6b, 0x7f, 0x5f, 0x8c, 0xd4, 0xbe,
|
||||
0xd0, 0xd9, 0x38, 0x30, 0x65, 0xf4, 0x01, 0x34, 0x13, 0x99, 0x0b, 0xad, 0x9c, 0x86, 0x69, 0x70,
|
||||
0xfd, 0x72, 0x83, 0x37, 0x45, 0x2e, 0xb0, 0x14, 0xda, 0xbb, 0x78, 0xef, 0x05, 0xc3, 0x76, 0xe6,
|
||||
0x8d, 0x33, 0x2b, 0x54, 0xc4, 0xee, 0x63, 0x68, 0x9f, 0xcf, 0xa4, 0xeb, 0xd0, 0xf8, 0x84, 0x63,
|
||||
0xab, 0xbe, 0xf8, 0xa4, 0x1b, 0xb0, 0x38, 0x62, 0x71, 0x8e, 0xf6, 0xdd, 0xcb, 0xe0, 0x69, 0xfd,
|
||||
0x09, 0xf1, 0x22, 0x58, 0x34, 0xd3, 0xe9, 0x3d, 0x58, 0x0d, 0xa5, 0xd0, 0x8c, 0x0b, 0xcc, 0x8e,
|
||||
0x53, 0xa6, 0x23, 0x5b, 0xbf, 0x72, 0x8e, 0x1e, 0x31, 0x1d, 0xd1, 0x9b, 0xd0, 0x8e, 0xa4, 0xd2,
|
||||
0x25, 0xc3, 0xde, 0x5b, 0x01, 0x54, 0xc9, 0x0c, 0xd9, 0xe0, 0x58, 0x8a, 0x78, 0x6c, 0x6e, 0xad,
|
||||
0x15, 0xb4, 0x0a, 0xe0, 0x9d, 0x88, 0xc7, 0x5e, 0x06, 0x70, 0xa1, 0xfc, 0xbf, 0x8c, 0xdb, 0x84,
|
||||
0xe5, 0x14, 0xb3, 0x84, 0xab, 0xc2, 0x08, 0xca, 0x1e, 0xf7, 0x34, 0xd4, 0x3b, 0x82, 0x4e, 0xe9,
|
||||
0xa4, 0x8c, 0xe9, 0xc2, 0x2c, 0xcf, 0xa1, 0x55, 0x39, 0x8b, 0xde, 0xbe, 0xfc, 0xaa, 0x33, 0x8e,
|
||||
0xeb, 0xce, 0xfc, 0x44, 0xa5, 0x45, 0x6a, 0xbd, 0x6f, 0x04, 0x3a, 0xe5, 0x1a, 0x47, 0x26, 0x41,
|
||||
0x0f, 0xa1, 0x33, 0xed, 0x1a, 0x3a, 0xaf, 0xae, 0xeb, 0x5d, 0x06, 0xe7, 0xd9, 0xcc, 0xab, 0xed,
|
||||
0x10, 0x7a, 0x08, 0xad, 0xea, 0xaa, 0x67, 0xf5, 0xcd, 0x18, 0xa4, 0xeb, 0xfe, 0x2d, 0x5d, 0xb5,
|
||||
0x7b, 0x71, 0xeb, 0xf4, 0xcc, 0x25, 0x3f, 0xce, 0xdc, 0xda, 0x97, 0x89, 0x4b, 0x4e, 0x27, 0x2e,
|
||||
0xf9, 0x3e, 0x71, 0xc9, 0xcf, 0x89, 0x4b, 0xbe, 0xfe, 0x72, 0x6b, 0x27, 0x4d, 0xf3, 0x5f, 0xb3,
|
||||
0xfb, 0x27, 0x00, 0x00, 0xff, 0xff, 0x99, 0xda, 0x39, 0xd8, 0xb5, 0x04, 0x00, 0x00,
|
||||
// 562 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcb, 0x8e, 0xd3, 0x4a,
|
||||
0x10, 0x4d, 0x27, 0x77, 0xf2, 0xa8, 0xc9, 0x3c, 0xd4, 0x37, 0x42, 0x96, 0x01, 0x2b, 0x32, 0x42,
|
||||
0x8a, 0x84, 0xf0, 0x0c, 0x61, 0x01, 0x42, 0x2c, 0x18, 0x94, 0x20, 0x8d, 0x86, 0x47, 0x64, 0x16,
|
||||
0x2c, 0xa3, 0x8e, 0x53, 0xc4, 0x16, 0x76, 0xb7, 0x71, 0xb7, 0x23, 0x65, 0xc7, 0x27, 0xf0, 0x19,
|
||||
0x7c, 0xca, 0x2c, 0x59, 0xb2, 0x64, 0xc2, 0x8e, 0xaf, 0x40, 0x6e, 0xdb, 0x79, 0x29, 0x62, 0xc5,
|
||||
0xce, 0x75, 0xea, 0x9c, 0xd4, 0xa9, 0xca, 0xb1, 0xa1, 0xc5, 0xe2, 0xc0, 0x89, 0x13, 0xa1, 0x04,
|
||||
0x6d, 0x4f, 0x71, 0x1e, 0x78, 0x18, 0x87, 0xe9, 0x2c, 0xe0, 0xe6, 0xc3, 0x59, 0xa0, 0xfc, 0x74,
|
||||
0xe2, 0x78, 0x22, 0x3a, 0x9b, 0x89, 0x99, 0x38, 0xd3, 0xa4, 0x49, 0xfa, 0x51, 0x57, 0xba, 0xd0,
|
||||
0x4f, 0xb9, 0xd8, 0x0e, 0xe1, 0xc4, 0xc5, 0x59, 0x20, 0x15, 0x26, 0x2e, 0x7e, 0x4e, 0x51, 0x2a,
|
||||
0x6a, 0x40, 0x63, 0x8e, 0x89, 0x0c, 0x04, 0x37, 0x48, 0x97, 0xf4, 0x5a, 0x6e, 0x59, 0x52, 0x13,
|
||||
0x9a, 0xc8, 0xa7, 0xb1, 0x08, 0xb8, 0x32, 0xaa, 0xba, 0xb5, 0xaa, 0xe9, 0x3d, 0x38, 0x4a, 0x50,
|
||||
0x8a, 0x34, 0xf1, 0x70, 0xcc, 0x59, 0x84, 0x46, 0x4d, 0x13, 0xda, 0x25, 0xf8, 0x96, 0x45, 0x68,
|
||||
0x37, 0xe0, 0x60, 0x18, 0xc5, 0x6a, 0x61, 0xbf, 0x82, 0xce, 0xeb, 0x40, 0xaa, 0x0b, 0x3e, 0xfd,
|
||||
0xc0, 0x94, 0xe7, 0xbb, 0x28, 0x63, 0xc1, 0x25, 0x52, 0x07, 0x1a, 0xf9, 0x36, 0xd2, 0x20, 0xdd,
|
||||
0x5a, 0xef, 0xb0, 0xdf, 0x71, 0x36, 0xb7, 0x73, 0x06, 0xba, 0x70, 0x4b, 0x92, 0x7d, 0x0e, 0xf5,
|
||||
0x1c, 0xa2, 0xc7, 0x50, 0xbd, 0x1c, 0x14, 0x86, 0xab, 0xc1, 0x80, 0xde, 0x82, 0xba, 0x8f, 0x2c,
|
||||
0x54, 0x7e, 0xe1, 0xb4, 0xa8, 0xec, 0x47, 0x70, 0x72, 0x11, 0x86, 0xc2, 0x63, 0x0a, 0xcb, 0x85,
|
||||
0x2d, 0x80, 0xe2, 0xf7, 0x2e, 0x07, 0xf9, 0xdc, 0x96, 0xbb, 0x81, 0xd8, 0xbf, 0x09, 0x9c, 0xae,
|
||||
0x35, 0x85, 0xd3, 0xe7, 0xf0, 0x1f, 0xf2, 0x79, 0x69, 0xb3, 0xb7, 0x6d, 0x73, 0x97, 0xed, 0x0c,
|
||||
0xf9, 0x5c, 0x0e, 0xb9, 0x4a, 0x16, 0xae, 0x56, 0xd1, 0x07, 0x50, 0x8f, 0x44, 0xca, 0x95, 0x34,
|
||||
0xaa, 0x5a, 0xff, 0xff, 0xb6, 0xfe, 0x4d, 0xd6, 0x73, 0x0b, 0x0a, 0xed, 0xaf, 0x8f, 0x52, 0xd3,
|
||||
0x6c, 0x63, 0xdf, 0x51, 0xde, 0xc7, 0xe8, 0xad, 0x0e, 0x63, 0x3e, 0x81, 0xd6, 0x6a, 0x26, 0x3d,
|
||||
0x85, 0xda, 0x27, 0x5c, 0x14, 0xc7, 0xc9, 0x1e, 0x69, 0x07, 0x0e, 0xe6, 0x2c, 0x4c, 0xb1, 0x38,
|
||||
0x4e, 0x5e, 0x3c, 0xab, 0x3e, 0x25, 0xb6, 0x0f, 0x07, 0x7a, 0x3a, 0xbd, 0x0f, 0xc7, 0x9e, 0xe0,
|
||||
0x8a, 0x05, 0x1c, 0x93, 0x71, 0xcc, 0x94, 0x5f, 0xe8, 0x8f, 0x56, 0xe8, 0x88, 0x29, 0x9f, 0xde,
|
||||
0x86, 0x96, 0x2f, 0xa4, 0xca, 0x19, 0x45, 0x28, 0x32, 0xa0, 0x6c, 0x26, 0xc8, 0xa6, 0x63, 0xc1,
|
||||
0xc3, 0x85, 0x0e, 0x44, 0xd3, 0x6d, 0x66, 0xc0, 0x3b, 0x1e, 0x2e, 0xec, 0x04, 0x60, 0xed, 0xfc,
|
||||
0x9f, 0x8c, 0xeb, 0xc2, 0x61, 0x8c, 0x49, 0x14, 0xc8, 0x2c, 0xad, 0xb2, 0x48, 0xe0, 0x26, 0xd4,
|
||||
0x1f, 0x41, 0x3b, 0x8f, 0x7b, 0xc2, 0x54, 0x96, 0xe8, 0x17, 0xd0, 0x2c, 0xe3, 0x4f, 0xef, 0x6e,
|
||||
0x5f, 0x75, 0xe7, 0xb5, 0x30, 0x77, 0xfe, 0xa2, 0x3c, 0xc7, 0x95, 0xfe, 0x37, 0x02, 0xed, 0x7c,
|
||||
0x8d, 0x91, 0x6e, 0xd0, 0x2b, 0x68, 0x6f, 0x46, 0x9b, 0xee, 0xd3, 0x99, 0xf6, 0x36, 0xb8, 0xef,
|
||||
0x5d, 0xb0, 0x2b, 0xe7, 0x84, 0x5e, 0x41, 0xb3, 0xcc, 0xd2, 0xae, 0xbf, 0x9d, 0x14, 0x9b, 0xd6,
|
||||
0xdf, 0x23, 0x68, 0x57, 0x5e, 0xde, 0xb9, 0xbe, 0xb1, 0xc8, 0x8f, 0x1b, 0xab, 0xf2, 0x65, 0x69,
|
||||
0x91, 0xeb, 0xa5, 0x45, 0xbe, 0x2f, 0x2d, 0xf2, 0x73, 0x69, 0x91, 0xaf, 0xbf, 0xac, 0xca, 0xa4,
|
||||
0xae, 0x3f, 0x08, 0x8f, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x17, 0x55, 0xaf, 0xe1, 0x5a, 0x04,
|
||||
0x00, 0x00,
|
||||
}
|
@@ -81,25 +81,21 @@ message AllocateRequest {
|
||||
repeated string devicesIDs = 1;
|
||||
}
|
||||
|
||||
// AllocateResponse includes the artifacts that needs to be injected into
|
||||
// a container for accessing 'deviceIDs' that were mentioned as part of
|
||||
// 'AllocateRequest'.
|
||||
// Failure Handling:
|
||||
// if Kubelet sends an allocation request for dev1 and dev2.
|
||||
// Allocation on dev1 succeeds but allocation on dev2 fails.
|
||||
// The Device plugin should send a ListAndWatch update and fail the
|
||||
// Allocation request
|
||||
message AllocateResponse {
|
||||
repeated DeviceRuntimeSpec spec = 1;
|
||||
}
|
||||
|
||||
// The list to be added to the CRI spec
|
||||
message DeviceRuntimeSpec {
|
||||
// ID of the Device
|
||||
string ID = 1;
|
||||
// List of environment variable to set in the container.
|
||||
map<string, string> envs = 2;
|
||||
// List of environment variable to be set in the container to access one of more devices.
|
||||
map<string, string> envs = 1;
|
||||
// Mounts for the container.
|
||||
repeated Mount mounts = 3;
|
||||
// Devices for the container
|
||||
repeated DeviceSpec devices = 4;
|
||||
repeated Mount mounts = 2;
|
||||
// Devices for the container.
|
||||
repeated DeviceSpec devices = 3;
|
||||
}
|
||||
|
||||
// Mount specifies a host volume to mount into a container.
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user