diff --git a/CHANGELOG-1.13.md b/CHANGELOG-1.13.md index ce934f5de265b..ab48278affb69 100644 --- a/CHANGELOG-1.13.md +++ b/CHANGELOG-1.13.md @@ -1,51 +1,58 @@ -- [v1.13.6](#v1136) - - [Downloads for v1.13.6](#downloads-for-v1136) +- [v1.13.7](#v1137) + - [Downloads for v1.13.7](#downloads-for-v1137) - [Client Binaries](#client-binaries) - [Server Binaries](#server-binaries) - [Node Binaries](#node-binaries) - - [Changelog since v1.13.5](#changelog-since-v1135) + - [Changelog since v1.13.6](#changelog-since-v1136) - [Other notable changes](#other-notable-changes) -- [v1.13.5](#v1135) - - [Downloads for v1.13.5](#downloads-for-v1135) +- [v1.13.6](#v1136) + - [Downloads for v1.13.6](#downloads-for-v1136) - [Client Binaries](#client-binaries-1) - [Server Binaries](#server-binaries-1) - [Node Binaries](#node-binaries-1) - - [Changelog since v1.13.4](#changelog-since-v1134) + - [Changelog since v1.13.5](#changelog-since-v1135) - [Other notable changes](#other-notable-changes-1) -- [v1.13.4](#v1134) - - [Downloads for v1.13.4](#downloads-for-v1134) +- [v1.13.5](#v1135) + - [Downloads for v1.13.5](#downloads-for-v1135) - [Client Binaries](#client-binaries-2) - [Server Binaries](#server-binaries-2) - [Node Binaries](#node-binaries-2) - - [Changelog since v1.13.3](#changelog-since-v1133) + - [Changelog since v1.13.4](#changelog-since-v1134) - [Other notable changes](#other-notable-changes-2) -- [v1.13.3](#v1133) - - [Downloads for v1.13.3](#downloads-for-v1133) +- [v1.13.4](#v1134) + - [Downloads for v1.13.4](#downloads-for-v1134) - [Client Binaries](#client-binaries-3) - [Server Binaries](#server-binaries-3) - [Node Binaries](#node-binaries-3) - - [Changelog since v1.13.2](#changelog-since-v1132) + - [Changelog since v1.13.3](#changelog-since-v1133) - [Other notable changes](#other-notable-changes-3) -- [v1.13.2](#v1132) - - [Downloads for v1.13.2](#downloads-for-v1132) +- [v1.13.3](#v1133) + - [Downloads for v1.13.3](#downloads-for-v1133) - [Client Binaries](#client-binaries-4) - [Server Binaries](#server-binaries-4) - [Node Binaries](#node-binaries-4) - - [Changelog since v1.13.1](#changelog-since-v1131) + - [Changelog since v1.13.2](#changelog-since-v1132) - [Other notable changes](#other-notable-changes-4) -- [v1.13.1](#v1131) - - [Downloads for v1.13.1](#downloads-for-v1131) +- [v1.13.2](#v1132) + - [Downloads for v1.13.2](#downloads-for-v1132) - [Client Binaries](#client-binaries-5) - [Server Binaries](#server-binaries-5) - [Node Binaries](#node-binaries-5) - - [Changelog since v1.13.0](#changelog-since-v1130) + - [Changelog since v1.13.1](#changelog-since-v1131) - [Other notable changes](#other-notable-changes-5) -- [v1.13.0](#v1130) - - [Downloads for v1.13.0](#downloads-for-v1130) +- [v1.13.1](#v1131) + - [Downloads for v1.13.1](#downloads-for-v1131) - [Client Binaries](#client-binaries-6) - [Server Binaries](#server-binaries-6) - [Node Binaries](#node-binaries-6) + - [Changelog since v1.13.0](#changelog-since-v1130) + - [Other notable changes](#other-notable-changes-6) +- [v1.13.0](#v1130) + - [Downloads for v1.13.0](#downloads-for-v1130) + - [Client Binaries](#client-binaries-7) + - [Server Binaries](#server-binaries-7) + - [Node Binaries](#node-binaries-7) - [Kubernetes 1.13 Release Notes](#kubernetes-113-release-notes) - [Security Content](#security-content) - [Urgent Upgrade Notes](#urgent-upgrade-notes) @@ -94,60 +101,128 @@ - [External Dependencies](#external-dependencies) - [v1.13.0-rc.2](#v1130-rc2) - [Downloads for v1.13.0-rc.2](#downloads-for-v1130-rc2) - - [Client Binaries](#client-binaries-7) - - [Server Binaries](#server-binaries-7) - - [Node Binaries](#node-binaries-7) - - [Changelog since v1.13.0-rc.1](#changelog-since-v1130-rc1) - - [Other notable changes](#other-notable-changes-6) -- [v1.13.0-rc.1](#v1130-rc1) - - [Downloads for v1.13.0-rc.1](#downloads-for-v1130-rc1) - [Client Binaries](#client-binaries-8) - [Server Binaries](#server-binaries-8) - [Node Binaries](#node-binaries-8) - - [Changelog since v1.13.0-beta.2](#changelog-since-v1130-beta2) + - [Changelog since v1.13.0-rc.1](#changelog-since-v1130-rc1) - [Other notable changes](#other-notable-changes-7) -- [v1.13.0-beta.2](#v1130-beta2) - - [Downloads for v1.13.0-beta.2](#downloads-for-v1130-beta2) +- [v1.13.0-rc.1](#v1130-rc1) + - [Downloads for v1.13.0-rc.1](#downloads-for-v1130-rc1) - [Client Binaries](#client-binaries-9) - [Server Binaries](#server-binaries-9) - [Node Binaries](#node-binaries-9) - - [Changelog since v1.13.0-beta.1](#changelog-since-v1130-beta1) + - [Changelog since v1.13.0-beta.2](#changelog-since-v1130-beta2) - [Other notable changes](#other-notable-changes-8) -- [v1.13.0-beta.1](#v1130-beta1) - - [Downloads for v1.13.0-beta.1](#downloads-for-v1130-beta1) +- [v1.13.0-beta.2](#v1130-beta2) + - [Downloads for v1.13.0-beta.2](#downloads-for-v1130-beta2) - [Client Binaries](#client-binaries-10) - [Server Binaries](#server-binaries-10) - [Node Binaries](#node-binaries-10) - - [Changelog since v1.13.0-alpha.3](#changelog-since-v1130-alpha3) - - [Action Required](#action-required) + - [Changelog since v1.13.0-beta.1](#changelog-since-v1130-beta1) - [Other notable changes](#other-notable-changes-9) -- [v1.13.0-alpha.3](#v1130-alpha3) - - [Downloads for v1.13.0-alpha.3](#downloads-for-v1130-alpha3) +- [v1.13.0-beta.1](#v1130-beta1) + - [Downloads for v1.13.0-beta.1](#downloads-for-v1130-beta1) - [Client Binaries](#client-binaries-11) - [Server Binaries](#server-binaries-11) - [Node Binaries](#node-binaries-11) - - [Changelog since v1.13.0-alpha.2](#changelog-since-v1130-alpha2) + - [Changelog since v1.13.0-alpha.3](#changelog-since-v1130-alpha3) + - [Action Required](#action-required) - [Other notable changes](#other-notable-changes-10) -- [v1.13.0-alpha.2](#v1130-alpha2) - - [Downloads for v1.13.0-alpha.2](#downloads-for-v1130-alpha2) +- [v1.13.0-alpha.3](#v1130-alpha3) + - [Downloads for v1.13.0-alpha.3](#downloads-for-v1130-alpha3) - [Client Binaries](#client-binaries-12) - [Server Binaries](#server-binaries-12) - [Node Binaries](#node-binaries-12) - - [Changelog since v1.13.0-alpha.1](#changelog-since-v1130-alpha1) + - [Changelog since v1.13.0-alpha.2](#changelog-since-v1130-alpha2) - [Other notable changes](#other-notable-changes-11) -- [v1.13.0-alpha.1](#v1130-alpha1) - - [Downloads for v1.13.0-alpha.1](#downloads-for-v1130-alpha1) +- [v1.13.0-alpha.2](#v1130-alpha2) + - [Downloads for v1.13.0-alpha.2](#downloads-for-v1130-alpha2) - [Client Binaries](#client-binaries-13) - [Server Binaries](#server-binaries-13) - [Node Binaries](#node-binaries-13) + - [Changelog since v1.13.0-alpha.1](#changelog-since-v1130-alpha1) + - [Other notable changes](#other-notable-changes-12) +- [v1.13.0-alpha.1](#v1130-alpha1) + - [Downloads for v1.13.0-alpha.1](#downloads-for-v1130-alpha1) + - [Client Binaries](#client-binaries-14) + - [Server Binaries](#server-binaries-14) + - [Node Binaries](#node-binaries-14) - [Changelog since v1.12.0](#changelog-since-v1120) - [Action Required](#action-required-1) - - [Other notable changes](#other-notable-changes-12) + - [Other notable changes](#other-notable-changes-13) +# v1.13.7 + +[Documentation](https://docs.k8s.io) + +## Downloads for v1.13.7 + + +filename | sha512 hash +-------- | ----------- +[kubernetes.tar.gz](https://dl.k8s.io/v1.13.7/kubernetes.tar.gz) | `361621b451b225b49f4e1782246851f50cc9638327dd5a98c574343532fae07a617505a6c649e82d5d0356b033bfb6bed38475937e89c3eec004af4d9f3ae4bb` +[kubernetes-src.tar.gz](https://dl.k8s.io/v1.13.7/kubernetes-src.tar.gz) | `e24151c80f2e0d6df24b4c4fc891695a3eba2b415b3fe4d53bca3ef76d54f1cd9a3b682b3ad8a433cf35be5e8832a503e439973d2475fa07929d53e5edfa84b2` + +### Client Binaries + +filename | sha512 hash +-------- | ----------- +[kubernetes-client-darwin-386.tar.gz](https://dl.k8s.io/v1.13.7/kubernetes-client-darwin-386.tar.gz) | `7fc4d4a0a78a327321abe95d1f370a8a075bcdcce01ba350df8dff9cdcd9b49dfaf3b259a125b9e8d79a48e5c4148f89bd498e114a4d9374efb06acae1ae5e38` +[kubernetes-client-darwin-amd64.tar.gz](https://dl.k8s.io/v1.13.7/kubernetes-client-darwin-amd64.tar.gz) | `9d06e2ceee5e316c0a8b3264f5047470cabc7c7fd08001d42519804a23064bfce8c6d41369375acc77df5a2225cfc5ca713c874fa0cb52105240d7654f46345e` +[kubernetes-client-linux-386.tar.gz](https://dl.k8s.io/v1.13.7/kubernetes-client-linux-386.tar.gz) | `82739ac7331f11b8d52b102565dcb3d309c7e640054714cf9e8af4d550b3099850b2389749e1934ffbd4e92c93716e899e3f3b2d37281c6ceb109e124176688e` +[kubernetes-client-linux-amd64.tar.gz](https://dl.k8s.io/v1.13.7/kubernetes-client-linux-amd64.tar.gz) | `677838b3fe8a06385c2433f2cb2bc59e902b90a95a8fb441f499b88560d6d9a11d18947fe17549d6d76a9c6aeab2cff5709fbf1f46c2c154006842109028148a` +[kubernetes-client-linux-arm.tar.gz](https://dl.k8s.io/v1.13.7/kubernetes-client-linux-arm.tar.gz) | `e12f268750a075ffdae1034902d3bc62526d2b77f135decd6766489a39b906da1574dcd0aacc549f9e7bf2c7435d54bb40fc673ba0bc584e226961fa49116264` +[kubernetes-client-linux-arm64.tar.gz](https://dl.k8s.io/v1.13.7/kubernetes-client-linux-arm64.tar.gz) | `f98279e2bf2358f8b2d13eefccfd74c69df3538432eab41742835a5661a621b987e6a98860938593dbd9cff5728c619758633a1131af98f3cb395cab393b47c5` +[kubernetes-client-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.13.7/kubernetes-client-linux-ppc64le.tar.gz) | `701c9708fe83fe8fb9335cbdc95c4a7d3e68c68366da42bc21e2ce7498e1202e2212f6cbe0861c087f5cb6c4a2eb687df55e7098e9ad388b7e18b879bc294d3b` +[kubernetes-client-linux-s390x.tar.gz](https://dl.k8s.io/v1.13.7/kubernetes-client-linux-s390x.tar.gz) | `8a227c2b2946b20c1635381f03dd62cd11722471cc635a74aeec821527a30eaa89a3cf0a996cf267ad5bbce30cf2da57a74fa13a6a20b927861fc4274da92a36` +[kubernetes-client-windows-386.tar.gz](https://dl.k8s.io/v1.13.7/kubernetes-client-windows-386.tar.gz) | `ad82690db12080fc1f3fd16a53d0113e33535f97164c7e9cad2e8ca791900865ca645d919d224c9c1d4ab579943af3743bb6d1106214b57b4a808729597a8c5b` +[kubernetes-client-windows-amd64.tar.gz](https://dl.k8s.io/v1.13.7/kubernetes-client-windows-amd64.tar.gz) | `c348990f2a51a2f849ca04ae94be2da3aa19111b4b7deb20f1edae013c7c4671b7a6781ec585d74953dda2af1f1088a82b6e7075b1801a9192e34034bc0df61b` + +### Server Binaries + +filename | sha512 hash +-------- | ----------- +[kubernetes-server-linux-amd64.tar.gz](https://dl.k8s.io/v1.13.7/kubernetes-server-linux-amd64.tar.gz) | `57c07e52b18d8cf4b6a41115c125995796561cd7b6d54bc6020f7660c1e5fabfc27ba8cd2816855b45b940625434f1ce9182a6ae4010683e527b92bf062fc6bc` +[kubernetes-server-linux-arm.tar.gz](https://dl.k8s.io/v1.13.7/kubernetes-server-linux-arm.tar.gz) | `4394b5e74862527d7e4146e256a39f33bb8d895d9c977c36a4ce78931f72a7fc3145481a726d0c64be79d74517573c1f7c26f2831943e9cb1c23f44457a48e8f` +[kubernetes-server-linux-arm64.tar.gz](https://dl.k8s.io/v1.13.7/kubernetes-server-linux-arm64.tar.gz) | `1956162425811f7b2dfd46cae12625055a43dfbf4d25efa18c13878dfa7f795aa6b41e351de2d2ffedbc3e91173af06de915b4c69a0cbc1913ee0c2b598a0686` +[kubernetes-server-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.13.7/kubernetes-server-linux-ppc64le.tar.gz) | `ca49b7cc9cb1ae1c87b7ebcdded43d0d7955a16cd0f4476527a78351e8e31c686cf795d3cb9282ff345fb3385d2b38b110b44add34662f9b4d4a8768df2d93be` +[kubernetes-server-linux-s390x.tar.gz](https://dl.k8s.io/v1.13.7/kubernetes-server-linux-s390x.tar.gz) | `14dbbe6be6d7e4d00ff5d2430d87d32b12e0005d8f31a98e96c77c8585ef2bea6298f9e569667fed77cb93c96766c99f542ebddafbbb21cf0ffcc9c50fd6a67d` + +### Node Binaries + +filename | sha512 hash +-------- | ----------- +[kubernetes-node-linux-amd64.tar.gz](https://dl.k8s.io/v1.13.7/kubernetes-node-linux-amd64.tar.gz) | `fd43140329e1aa1ef55083e3812f8351a835619420cc322d6df1882c2f1b626456828392d2e4b6f1cd3b547f1693dd61a9cc1b0f1a14711431e344b0384aa656` +[kubernetes-node-linux-arm.tar.gz](https://dl.k8s.io/v1.13.7/kubernetes-node-linux-arm.tar.gz) | `c6f97cba9426e1caa28442fb8a09c5dcf3323a40310d20cd93c7ccddc44b8910285736f77a4f2d16dda2418e16c58fd896ae7cbddf88fea7fb9bca38f58c88f4` +[kubernetes-node-linux-arm64.tar.gz](https://dl.k8s.io/v1.13.7/kubernetes-node-linux-arm64.tar.gz) | `03b895c398f4ee12a8183023ad3e945ee253545801a6d69cec14bfaadc1b3c143757bdc3963a17b70c399250ba2dba1d881f62cda90d4cb0a44fabf23ac07959` +[kubernetes-node-linux-ppc64le.tar.gz](https://dl.k8s.io/v1.13.7/kubernetes-node-linux-ppc64le.tar.gz) | `515dfdda151087fa3b603c8bf1f8868406bacc4956866e0a8ec976b2981063ec9bca02fcf1ddf7d7c6b3fbcacc1939a058bf6e3436fa704311a3154e62179ab7` +[kubernetes-node-linux-s390x.tar.gz](https://dl.k8s.io/v1.13.7/kubernetes-node-linux-s390x.tar.gz) | `aff410344de29dbf86d5d1dcffe6555fc5b278268e8bb81052725b6c111b281538d58e580a8ff9399117eba02b702830b56b05006536c40ea41da67cd399d552` +[kubernetes-node-windows-amd64.tar.gz](https://dl.k8s.io/v1.13.7/kubernetes-node-windows-amd64.tar.gz) | `40fc44271f69a90685d6193f785b9a8523b6db3cc9c1fdb5586dfbab32a11153f8271793589087582a90621abd144a20c5e28b5cb18b50580f9e58e8c98b4d53` + +## Changelog since v1.13.6 + +### Other notable changes + +* IPVS: Disable graceful termination for UDP traffic to solve issues with high number of UDP connections (DNS / syslog in particular) ([#77802](https://github.com/kubernetes/kubernetes/pull/77802), [@lbernail](https://github.com/lbernail)) +* Fix broken detection of non-root image user ID ([#78261](https://github.com/kubernetes/kubernetes/pull/78261), [@tallclair](https://github.com/tallclair)) +* Active watches of custom resources now terminate properly if the CRD is modified. ([#78029](https://github.com/kubernetes/kubernetes/pull/78029), [@liggitt](https://github.com/liggitt)) +* fix azure retry issue when return 2XX with error ([#78298](https://github.com/kubernetes/kubernetes/pull/78298), [@andyzhangx](https://github.com/andyzhangx)) +* fix incorrect prometheus azure metrics ([#77722](https://github.com/kubernetes/kubernetes/pull/77722), [@andyzhangx](https://github.com/andyzhangx)) +* Fixes a bug where dry-run is not honored for pod/eviction sub-resource. ([#76969](https://github.com/kubernetes/kubernetes/pull/76969), [@apelisse](https://github.com/apelisse)) +* Fixes bug in DaemonSetController causing it to stop processing some DaemonSets for 5 minutes after node removal. ([#76060](https://github.com/kubernetes/kubernetes/pull/76060), [@krzysztof-jastrzebski](https://github.com/krzysztof-jastrzebski)) +* Check if container memory stats are available before accessing it ([#77656](https://github.com/kubernetes/kubernetes/pull/77656), [@yastij](https://github.com/yastij)) +* client-go and kubectl no longer write cached discovery files with world-accessible file permissions ([#77874](https://github.com/kubernetes/kubernetes/pull/77874), [@yuchengwu](https://github.com/yuchengwu)) +* Fixed a bug in the apiserver storage that could cause just-added finalizers to be ignored on an immediately following delete request, leading to premature deletion. ([#77619](https://github.com/kubernetes/kubernetes/pull/77619), [@caesarxuchao](https://github.com/caesarxuchao)) +* If a pod has a running instance, the stats of its previously terminated instances will not show up in the kubelet summary stats any more for CRI runtimes like containerd and cri-o. ([#77426](https://github.com/kubernetes/kubernetes/pull/77426), [@Random-Liu](https://github.com/Random-Liu)) + * This keeps the behavior consistent with Docker integration, and fixes an issue that some container Prometheus metrics don't work when there are summary stats for multiple instances of the same pod. +* Kubelet: add usageNanoCores from CRI stats provider ([#73659](https://github.com/kubernetes/kubernetes/pull/73659), [@feiskyer](https://github.com/feiskyer)) + + + # v1.13.6 [Documentation](https://docs.k8s.io) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index e41640ed37d96..737606db573ec 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -15,15 +15,6 @@ "./..." ], "Deps": [ - { - "ImportPath": "bitbucket.org/bertimus9/systemstat", - "Rev": "0eeff89b0690611fc32e21f0cd2e4434abf8fe53" - }, - { - "ImportPath": "bitbucket.org/ww/goautoneg", - "Comment": "null-5", - "Rev": "75cd24fc2f2c2a2088577d12123ddee5f54e0675" - }, { "ImportPath": "cloud.google.com/go/compute/metadata", "Comment": "v0.1.0-115-g3b1ae45394a234", @@ -2576,6 +2567,10 @@ "ImportPath": "github.com/mrunalp/fileutils", "Rev": "4ee1cc9a80582a0c75febdd5cfa779ee4361cbca" }, + { + "ImportPath": "github.com/munnerz/goautoneg", + "Rev": "a547fc61f48d567d5b4ec6f8aee5573d8efce11d" + }, { "ImportPath": "github.com/mvdan/xurls", "Comment": "v0.8.0-14-g1b768d7c393abd", @@ -2585,6 +2580,10 @@ "ImportPath": "github.com/mxk/go-flowrate/flowrate", "Rev": "cca7078d478f8520f85629ad7c68962d31ed7682" }, + { + "ImportPath": "github.com/nikhita/systemstat", + "Rev": "0eeff89b0690611fc32e21f0cd2e4434abf8fe53" + }, { "ImportPath": "github.com/onsi/ginkgo", "Comment": "v1.2.0-95-g67b9df7f55fe11", @@ -4014,55 +4013,55 @@ }, { "ImportPath": "k8s.io/kube-openapi/cmd/openapi-gen", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/cmd/openapi-gen/args", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/aggregator", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/builder", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/common", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/generators", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/generators/rules", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/handler", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/util", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/util/proto", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/util/proto/testing", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/util/proto/validation", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/util/sets", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/utils/clock", diff --git a/Godeps/LICENSES b/Godeps/LICENSES index 9c8478b0d0640..1501392c769e7 100644 --- a/Godeps/LICENSES +++ b/Godeps/LICENSES @@ -207,109 +207,6 @@ = LICENSE 3b83ef96387f14655fc854ddc3c6bd57 ================================================================================ -================================================================================ -= vendor/bitbucket.org/bertimus9/systemstat licensed under: = - -The MIT License (MIT) - -Copyright (c) 2013 Phillip Bond - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -= vendor/bitbucket.org/bertimus9/systemstat/LICENSE 6f7ba8122a9b3146266dafa39c5b8ee3 -================================================================================ - - -================================================================================ -= vendor/bitbucket.org/ww/goautoneg licensed under: = - -PACKAGE - -package goautoneg -import "bitbucket.org/ww/goautoneg" - -HTTP Content-Type Autonegotiation. - -The functions in this package implement the behaviour specified in -http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html - -Copyright (c) 2011, Open Knowledge Foundation Ltd. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - Neither the name of the Open Knowledge Foundation Ltd. nor the - names of its contributors may be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -FUNCTIONS - -func Negotiate(header string, alternatives []string) (content_type string) -Negotiate the most appropriate content_type given the accept header -and a list of alternatives. - -func ParseAccept(header string) (accept []Accept) -Parse an Accept Header string returning a sorted list -of clauses - - -TYPES - -type Accept struct { - Type, SubType string - Q float32 - Params map[string]string -} -Structure to represent a clause in an HTTP Accept Header - - -SUBDIRECTORIES - - .hg - -= vendor/bitbucket.org/ww/goautoneg/README.txt a33eda65f1bc658f358e1d690c6a93d4 -================================================================================ - - ================================================================================ = vendor/cloud.google.com/go/compute/metadata licensed under: = @@ -78856,6 +78753,81 @@ SOFTWARE. ================================================================================ +================================================================================ += vendor/github.com/munnerz/goautoneg licensed under: = + +PACKAGE + +package goautoneg +import "bitbucket.org/ww/goautoneg" + +HTTP Content-Type Autonegotiation. + +The functions in this package implement the behaviour specified in +http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html + +Copyright (c) 2011, Open Knowledge Foundation Ltd. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + Neither the name of the Open Knowledge Foundation Ltd. nor the + names of its contributors may be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +FUNCTIONS + +func Negotiate(header string, alternatives []string) (content_type string) +Negotiate the most appropriate content_type given the accept header +and a list of alternatives. + +func ParseAccept(header string) (accept []Accept) +Parse an Accept Header string returning a sorted list +of clauses + + +TYPES + +type Accept struct { + Type, SubType string + Q float32 + Params map[string]string +} +Structure to represent a clause in an HTTP Accept Header + + +SUBDIRECTORIES + + .hg + += vendor/github.com/munnerz/goautoneg/README.txt a33eda65f1bc658f358e1d690c6a93d4 +================================================================================ + + ================================================================================ = vendor/github.com/mvdan/xurls licensed under: = @@ -78928,6 +78900,34 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================================================ +================================================================================ += vendor/github.com/nikhita/systemstat licensed under: = + +The MIT License (MIT) + +Copyright (c) 2013 Phillip Bond + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + += vendor/github.com/nikhita/systemstat/LICENSE 6f7ba8122a9b3146266dafa39c5b8ee3 +================================================================================ + + ================================================================================ = vendor/github.com/Nvveen/Gotty licensed under: = diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 51c6464adc339..19a0217b42430 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "title": "Kubernetes", - "version": "v1.13.7" + "version": "v1.13.8" }, "paths": { "/api/": { diff --git a/cluster/addons/ip-masq-agent/ip-masq-agent.yaml b/cluster/addons/ip-masq-agent/ip-masq-agent.yaml index b6ede4f2fdc7c..afb1dd82459ea 100644 --- a/cluster/addons/ip-masq-agent/ip-masq-agent.yaml +++ b/cluster/addons/ip-masq-agent/ip-masq-agent.yaml @@ -8,14 +8,14 @@ metadata: kubernetes.io/cluster-service: "true" addonmanager.kubernetes.io/mode: Reconcile --- -# https://github.com/kubernetes-incubator/ip-masq-agent/blob/v2.0.0/README.md +# https://github.com/kubernetes-incubator/ip-masq-agent/blob/v2.3.0/README.md apiVersion: extensions/v1beta1 kind: DaemonSet metadata: name: ip-masq-agent namespace: kube-system labels: - addonmanager.kubernetes.io/mode: Reconcile + addonmanager.kubernetes.io/mode: Reconcile spec: template: metadata: @@ -29,7 +29,7 @@ spec: hostNetwork: true containers: - name: ip-masq-agent - image: k8s.gcr.io/ip-masq-agent-amd64:v2.1.1 + image: k8s.gcr.io/ip-masq-agent-amd64:v2.3.0 args: - --masq-chain=IP-MASQ resources: @@ -42,7 +42,7 @@ spec: - name: config mountPath: /etc/config nodeSelector: - beta.kubernetes.io/masq-agent-ds-ready: "true" + beta.kubernetes.io/masq-agent-ds-ready: "true" volumes: - name: config configMap: diff --git a/cluster/gce/manifests/kube-addon-manager.yaml b/cluster/gce/manifests/kube-addon-manager.yaml index 9694f88a05a0d..785fd14825116 100644 --- a/cluster/gce/manifests/kube-addon-manager.yaml +++ b/cluster/gce/manifests/kube-addon-manager.yaml @@ -14,7 +14,7 @@ spec: - name: kube-addon-manager # When updating version also bump it in: # - test/kubemark/resources/manifests/kube-addon-manager.yaml - image: k8s.gcr.io/kube-addon-manager:v8.9 + image: k8s.gcr.io/kube-addon-manager:v8.9.1 command: - /bin/bash - -c diff --git a/cmd/kubelet/app/server.go b/cmd/kubelet/app/server.go index 04422bb899095..4309f7c21d54f 100644 --- a/cmd/kubelet/app/server.go +++ b/cmd/kubelet/app/server.go @@ -745,9 +745,10 @@ func run(s *options.KubeletServer, kubeDeps *kubelet.Dependencies, stopCh <-chan } if s.HealthzPort > 0 { - healthz.DefaultHealthz() + mux := http.NewServeMux() + healthz.InstallHandler(mux) go wait.Until(func() { - err := http.ListenAndServe(net.JoinHostPort(s.HealthzBindAddress, strconv.Itoa(int(s.HealthzPort))), nil) + err := http.ListenAndServe(net.JoinHostPort(s.HealthzBindAddress, strconv.Itoa(int(s.HealthzPort))), mux) if err != nil { klog.Errorf("Starting health server failed: %v", err) } diff --git a/pkg/api/pod/util.go b/pkg/api/pod/util.go index d519c9a25ff30..d080d9dcd8a15 100644 --- a/pkg/api/pod/util.go +++ b/pkg/api/pod/util.go @@ -286,12 +286,22 @@ func DropDisabledProcMountField(podSpec *api.PodSpec) { defProcMount := api.DefaultProcMount for i := range podSpec.Containers { if podSpec.Containers[i].SecurityContext != nil { - podSpec.Containers[i].SecurityContext.ProcMount = &defProcMount + if podSpec.Containers[i].SecurityContext.ProcMount != nil { + // The ProcMount field was improperly forced to non-nil in 1.12. + // If the feature is disabled, and the ProcMount field is present in the incoming object, force to the default value. + // Note: we cannot force the field to nil when the feature is disabled because it causes a diff against previously persisted data. + podSpec.Containers[i].SecurityContext.ProcMount = &defProcMount + } } } for i := range podSpec.InitContainers { if podSpec.InitContainers[i].SecurityContext != nil { - podSpec.InitContainers[i].SecurityContext.ProcMount = &defProcMount + if podSpec.InitContainers[i].SecurityContext.ProcMount != nil { + // The ProcMount field was improperly forced to non-nil in 1.12. + // If the feature is disabled, and the ProcMount field is present in the incoming object, force to the default value. + // Note: we cannot force the field to nil when the feature is disabled because it causes a diff against previously persisted data. + podSpec.InitContainers[i].SecurityContext.ProcMount = &defProcMount + } } } } diff --git a/pkg/cloudprovider/providers/aws/aws.go b/pkg/cloudprovider/providers/aws/aws.go index d4f38dc75f4e7..5ea3f003c3eed 100644 --- a/pkg/cloudprovider/providers/aws/aws.go +++ b/pkg/cloudprovider/providers/aws/aws.go @@ -1237,14 +1237,17 @@ func (c *Cloud) NodeAddresses(ctx context.Context, name types.NodeName) ([]v1.No addresses = append(addresses, v1.NodeAddress{Type: v1.NodeExternalIP, Address: externalIP}) } - internalDNS, err := c.metadata.GetMetadata("local-hostname") - if err != nil || len(internalDNS) == 0 { + localHostname, err := c.metadata.GetMetadata("local-hostname") + if err != nil || len(localHostname) == 0 { //TODO: It would be nice to be able to determine the reason for the failure, // but the AWS client masks all failures with the same error description. klog.V(4).Info("Could not determine private DNS from AWS metadata.") } else { - addresses = append(addresses, v1.NodeAddress{Type: v1.NodeInternalDNS, Address: internalDNS}) - addresses = append(addresses, v1.NodeAddress{Type: v1.NodeHostName, Address: internalDNS}) + hostname, internalDNS := parseMetadataLocalHostname(localHostname) + addresses = append(addresses, v1.NodeAddress{Type: v1.NodeHostName, Address: hostname}) + for _, d := range internalDNS { + addresses = append(addresses, v1.NodeAddress{Type: v1.NodeInternalDNS, Address: d}) + } } externalDNS, err := c.metadata.GetMetadata("public-hostname") @@ -1266,6 +1269,26 @@ func (c *Cloud) NodeAddresses(ctx context.Context, name types.NodeName) ([]v1.No return extractNodeAddresses(instance) } +// parseMetadataLocalHostname parses the output of "local-hostname" metadata. +// If a DHCP option set is configured for a VPC and it has multiple domain names, GetMetadata +// returns a string containing first the hostname followed by additional domain names, +// space-separated. For example, if the DHCP option set has: +// domain-name = us-west-2.compute.internal a.a b.b c.c d.d; +// $ curl http://169.254.169.254/latest/meta-data/local-hostname +// ip-192-168-111-51.us-west-2.compute.internal a.a b.b c.c d.d +func parseMetadataLocalHostname(metadata string) (string, []string) { + localHostnames := strings.Fields(metadata) + hostname := localHostnames[0] + internalDNS := []string{hostname} + + privateAddress := strings.Split(hostname, ".")[0] + for _, h := range localHostnames[1:] { + internalDNSAddress := privateAddress + "." + h + internalDNS = append(internalDNS, internalDNSAddress) + } + return hostname, internalDNS +} + // extractNodeAddresses maps the instance information from EC2 to an array of NodeAddresses func extractNodeAddresses(instance *ec2.Instance) ([]v1.NodeAddress, error) { // Not clear if the order matters here, but we might as well indicate a sensible preference order diff --git a/pkg/cloudprovider/providers/aws/aws_test.go b/pkg/cloudprovider/providers/aws/aws_test.go index 50e303d43d3d5..a0f93da6c722d 100644 --- a/pkg/cloudprovider/providers/aws/aws_test.go +++ b/pkg/cloudprovider/providers/aws/aws_test.go @@ -398,6 +398,41 @@ func TestNodeAddressesWithMetadata(t *testing.T) { testHasNodeAddress(t, addrs, v1.NodeExternalIP, "2.3.4.5") } +func TestParseMetadataLocalHostname(t *testing.T) { + tests := []struct { + name string + metadata string + hostname string + internalDNS []string + }{ + { + "single hostname", + "ip-172-31-16-168.us-west-2.compute.internal", + "ip-172-31-16-168.us-west-2.compute.internal", + []string{"ip-172-31-16-168.us-west-2.compute.internal"}, + }, + { + "dhcp options set with three additional domain names", + "ip-172-31-16-168.us-west-2.compute.internal example.com example.ca example.org", + "ip-172-31-16-168.us-west-2.compute.internal", + []string{"ip-172-31-16-168.us-west-2.compute.internal", "ip-172-31-16-168.example.com", "ip-172-31-16-168.example.ca", "ip-172-31-16-168.example.org"}, + }, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + hostname, internalDNS := parseMetadataLocalHostname(test.metadata) + if hostname != test.hostname { + t.Errorf("got hostname %v, expected %v", hostname, test.hostname) + } + for i, v := range internalDNS { + if v != test.internalDNS[i] { + t.Errorf("got an internalDNS %v, expected %v", v, test.internalDNS[i]) + } + } + }) + } +} + func TestGetRegion(t *testing.T) { aws := mockAvailabilityZone("us-west-2e") zones, ok := aws.Zones() diff --git a/pkg/cloudprovider/providers/azure/azure_controller_standard.go b/pkg/cloudprovider/providers/azure/azure_controller_standard.go index 8e10fc750802e..71f26265b04f1 100644 --- a/pkg/cloudprovider/providers/azure/azure_controller_standard.go +++ b/pkg/cloudprovider/providers/azure/azure_controller_standard.go @@ -17,7 +17,6 @@ limitations under the License. package azure import ( - "fmt" "net/http" "strings" @@ -132,7 +131,8 @@ func (as *availabilitySet) DetachDisk(diskName, diskURI string, nodeName types.N } if !bFoundDisk { - return nil, fmt.Errorf("detach azure disk failure, disk %s not found, diskURI: %s", diskName, diskURI) + // only log here, next action is to update VM status with original meta data + klog.Errorf("detach azure disk: disk %s not found, diskURI: %s", diskName, diskURI) } newVM := compute.VirtualMachine{ diff --git a/pkg/cloudprovider/providers/azure/azure_controller_vmss.go b/pkg/cloudprovider/providers/azure/azure_controller_vmss.go index db914c2c9a045..8c6b8f34638bf 100644 --- a/pkg/cloudprovider/providers/azure/azure_controller_vmss.go +++ b/pkg/cloudprovider/providers/azure/azure_controller_vmss.go @@ -17,7 +17,6 @@ limitations under the License. package azure import ( - "fmt" "net/http" "strings" @@ -136,7 +135,8 @@ func (ss *scaleSet) DetachDisk(diskName, diskURI string, nodeName types.NodeName } if !bFoundDisk { - return nil, fmt.Errorf("detach azure disk failure, disk %s not found, diskURI: %s", diskName, diskURI) + // only log here, next action is to update VM status with original meta data + klog.Errorf("detach azure disk: disk %s not found, diskURI: %s", diskName, diskURI) } newVM := compute.VirtualMachineScaleSetVM{ diff --git a/pkg/cloudprovider/providers/azure/azure_loadbalancer.go b/pkg/cloudprovider/providers/azure/azure_loadbalancer.go index 4b20fefa0ed92..d2a4fc76c4d06 100644 --- a/pkg/cloudprovider/providers/azure/azure_loadbalancer.go +++ b/pkg/cloudprovider/providers/azure/azure_loadbalancer.go @@ -1542,7 +1542,10 @@ func findSecurityRule(rules []network.SecurityRule, rule network.SecurityRule) b func (az *Cloud) getPublicIPAddressResourceGroup(service *v1.Service) string { if resourceGroup, found := service.Annotations[ServiceAnnotationLoadBalancerResourceGroup]; found { - return resourceGroup + resourceGroupName := strings.TrimSpace(resourceGroup) + if len(resourceGroupName) > 0 { + return resourceGroupName + } } return az.ResourceGroup diff --git a/pkg/cloudprovider/providers/azure/azure_loadbalancer_test.go b/pkg/cloudprovider/providers/azure/azure_loadbalancer_test.go index dba9026cde842..0947d293da379 100644 --- a/pkg/cloudprovider/providers/azure/azure_loadbalancer_test.go +++ b/pkg/cloudprovider/providers/azure/azure_loadbalancer_test.go @@ -303,3 +303,35 @@ func TestEnsureLoadBalancerDeleted(t *testing.T) { assert.Equal(t, len(result), 0, "TestCase[%d]: %s", i, c.desc) } } + +func TestGetPublicIPAddressResourceGroup(t *testing.T) { + az := getTestCloud() + + for i, c := range []struct { + desc string + annotations map[string]string + expected string + }{ + { + desc: "no annotation", + expected: "rg", + }, + { + desc: "annoation with empty string resource group", + annotations: map[string]string{ServiceAnnotationLoadBalancerResourceGroup: ""}, + expected: "rg", + }, + { + desc: "annoation with non-empty resource group ", + annotations: map[string]string{ServiceAnnotationLoadBalancerResourceGroup: "rg2"}, + expected: "rg2", + }, + } { + t.Run(c.desc, func(t *testing.T) { + s := &v1.Service{} + s.Annotations = c.annotations + real := az.getPublicIPAddressResourceGroup(s) + assert.Equal(t, c.expected, real, "TestCase[%d]: %s", i, c.desc) + }) + } +} diff --git a/pkg/controller/podautoscaler/horizontal.go b/pkg/controller/podautoscaler/horizontal.go index 0e8cca59281dd..1a5fa3bf91c0d 100644 --- a/pkg/controller/podautoscaler/horizontal.go +++ b/pkg/controller/podautoscaler/horizontal.go @@ -23,7 +23,7 @@ import ( autoscalingv1 "k8s.io/api/autoscaling/v1" autoscalingv2 "k8s.io/api/autoscaling/v2beta2" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" apiequality "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/api/errors" apimeta "k8s.io/apimachinery/pkg/api/meta" @@ -228,7 +228,8 @@ func (a *HorizontalController) processNextWorkItem() bool { func (a *HorizontalController) computeReplicasForMetrics(hpa *autoscalingv2.HorizontalPodAutoscaler, scale *autoscalingv1.Scale, metricSpecs []autoscalingv2.MetricSpec) (replicas int32, metric string, statuses []autoscalingv2.MetricStatus, timestamp time.Time, err error) { - currentReplicas := scale.Status.Replicas + specReplicas := scale.Spec.Replicas + statusReplicas := scale.Status.Replicas statuses = make([]autoscalingv2.MetricStatus, len(metricSpecs)) @@ -260,7 +261,7 @@ func (a *HorizontalController) computeReplicasForMetrics(hpa *autoscalingv2.Hori setCondition(hpa, autoscalingv2.ScalingActive, v1.ConditionFalse, "FailedGetObjectMetric", "the HPA was unable to compute the replica count: %v", err) return 0, "", nil, time.Time{}, fmt.Errorf("failed to get object metric value: %v", err) } - replicaCountProposal, timestampProposal, metricNameProposal, err = a.computeStatusForObjectMetric(currentReplicas, metricSpec, hpa, selector, &statuses[i], metricSelector) + replicaCountProposal, timestampProposal, metricNameProposal, err = a.computeStatusForObjectMetric(specReplicas, metricSpec, hpa, selector, &statuses[i], metricSelector) if err != nil { return 0, "", nil, time.Time{}, fmt.Errorf("failed to get object metric value: %v", err) } @@ -271,17 +272,17 @@ func (a *HorizontalController) computeReplicasForMetrics(hpa *autoscalingv2.Hori setCondition(hpa, autoscalingv2.ScalingActive, v1.ConditionFalse, "FailedGetPodsMetric", "the HPA was unable to compute the replica count: %v", err) return 0, "", nil, time.Time{}, fmt.Errorf("failed to get pods metric value: %v", err) } - replicaCountProposal, timestampProposal, metricNameProposal, err = a.computeStatusForPodsMetric(currentReplicas, metricSpec, hpa, selector, &statuses[i], metricSelector) + replicaCountProposal, timestampProposal, metricNameProposal, err = a.computeStatusForPodsMetric(specReplicas, metricSpec, hpa, selector, &statuses[i], metricSelector) if err != nil { return 0, "", nil, time.Time{}, fmt.Errorf("failed to get object metric value: %v", err) } case autoscalingv2.ResourceMetricSourceType: - replicaCountProposal, timestampProposal, metricNameProposal, err = a.computeStatusForResourceMetric(currentReplicas, metricSpec, hpa, selector, &statuses[i]) + replicaCountProposal, timestampProposal, metricNameProposal, err = a.computeStatusForResourceMetric(specReplicas, metricSpec, hpa, selector, &statuses[i]) if err != nil { return 0, "", nil, time.Time{}, err } case autoscalingv2.ExternalMetricSourceType: - replicaCountProposal, timestampProposal, metricNameProposal, err = a.computeStatusForExternalMetric(currentReplicas, metricSpec, hpa, selector, &statuses[i]) + replicaCountProposal, timestampProposal, metricNameProposal, err = a.computeStatusForExternalMetric(specReplicas, statusReplicas, metricSpec, hpa, selector, &statuses[i]) if err != nil { return 0, "", nil, time.Time{}, err } @@ -319,8 +320,8 @@ func (a *HorizontalController) reconcileKey(key string) (deleted bool, err error } // computeStatusForObjectMetric computes the desired number of replicas for the specified metric of type ObjectMetricSourceType. -func (a *HorizontalController) computeStatusForObjectMetric(currentReplicas int32, metricSpec autoscalingv2.MetricSpec, hpa *autoscalingv2.HorizontalPodAutoscaler, selector labels.Selector, status *autoscalingv2.MetricStatus, metricSelector labels.Selector) (int32, time.Time, string, error) { - replicaCountProposal, utilizationProposal, timestampProposal, err := a.replicaCalc.GetObjectMetricReplicas(currentReplicas, metricSpec.Object.Target.Value.MilliValue(), metricSpec.Object.Metric.Name, hpa.Namespace, &metricSpec.Object.DescribedObject, selector, metricSelector) +func (a *HorizontalController) computeStatusForObjectMetric(specReplicas int32, metricSpec autoscalingv2.MetricSpec, hpa *autoscalingv2.HorizontalPodAutoscaler, selector labels.Selector, status *autoscalingv2.MetricStatus, metricSelector labels.Selector) (int32, time.Time, string, error) { + replicaCountProposal, utilizationProposal, timestampProposal, err := a.replicaCalc.GetObjectMetricReplicas(specReplicas, metricSpec.Object.Target.Value.MilliValue(), metricSpec.Object.Metric.Name, hpa.Namespace, &metricSpec.Object.DescribedObject, selector, metricSelector) if err != nil { a.eventRecorder.Event(hpa, v1.EventTypeWarning, "FailedGetObjectMetric", err.Error()) setCondition(hpa, autoscalingv2.ScalingActive, v1.ConditionFalse, "FailedGetObjectMetric", "the HPA was unable to compute the replica count: %v", err) @@ -419,9 +420,9 @@ func (a *HorizontalController) computeStatusForResourceMetric(currentReplicas in } // computeStatusForExternalMetric computes the desired number of replicas for the specified metric of type ExternalMetricSourceType. -func (a *HorizontalController) computeStatusForExternalMetric(currentReplicas int32, metricSpec autoscalingv2.MetricSpec, hpa *autoscalingv2.HorizontalPodAutoscaler, selector labels.Selector, status *autoscalingv2.MetricStatus) (int32, time.Time, string, error) { +func (a *HorizontalController) computeStatusForExternalMetric(specReplicas, statusReplicas int32, metricSpec autoscalingv2.MetricSpec, hpa *autoscalingv2.HorizontalPodAutoscaler, selector labels.Selector, status *autoscalingv2.MetricStatus) (int32, time.Time, string, error) { if metricSpec.External.Target.AverageValue != nil { - replicaCountProposal, utilizationProposal, timestampProposal, err := a.replicaCalc.GetExternalPerPodMetricReplicas(currentReplicas, metricSpec.External.Target.AverageValue.MilliValue(), metricSpec.External.Metric.Name, hpa.Namespace, metricSpec.External.Metric.Selector) + replicaCountProposal, utilizationProposal, timestampProposal, err := a.replicaCalc.GetExternalPerPodMetricReplicas(statusReplicas, metricSpec.External.Target.AverageValue.MilliValue(), metricSpec.External.Metric.Name, hpa.Namespace, metricSpec.External.Metric.Selector) if err != nil { a.eventRecorder.Event(hpa, v1.EventTypeWarning, "FailedGetExternalMetric", err.Error()) setCondition(hpa, autoscalingv2.ScalingActive, v1.ConditionFalse, "FailedGetExternalMetric", "the HPA was unable to compute the replica count: %v", err) @@ -442,7 +443,7 @@ func (a *HorizontalController) computeStatusForExternalMetric(currentReplicas in return replicaCountProposal, timestampProposal, fmt.Sprintf("external metric %s(%+v)", metricSpec.External.Metric.Name, metricSpec.External.Metric.Selector), nil } if metricSpec.External.Target.Value != nil { - replicaCountProposal, utilizationProposal, timestampProposal, err := a.replicaCalc.GetExternalMetricReplicas(currentReplicas, metricSpec.External.Target.Value.MilliValue(), metricSpec.External.Metric.Name, hpa.Namespace, metricSpec.External.Metric.Selector, selector) + replicaCountProposal, utilizationProposal, timestampProposal, err := a.replicaCalc.GetExternalMetricReplicas(specReplicas, metricSpec.External.Target.Value.MilliValue(), metricSpec.External.Metric.Name, hpa.Namespace, metricSpec.External.Metric.Selector, selector) if err != nil { a.eventRecorder.Event(hpa, v1.EventTypeWarning, "FailedGetExternalMetric", err.Error()) setCondition(hpa, autoscalingv2.ScalingActive, v1.ConditionFalse, "FailedGetExternalMetric", "the HPA was unable to compute the replica count: %v", err) @@ -517,7 +518,7 @@ func (a *HorizontalController) reconcileAutoscaler(hpav1Shared *autoscalingv1.Ho return fmt.Errorf("failed to query scale subresource for %s: %v", reference, err) } setCondition(hpa, autoscalingv2.AbleToScale, v1.ConditionTrue, "SucceededGetScale", "the HPA controller was able to get the target's current scale") - currentReplicas := scale.Status.Replicas + currentReplicas := scale.Spec.Replicas a.recordInitialRecommendation(currentReplicas, key) var metricStatuses []autoscalingv2.MetricStatus diff --git a/pkg/controller/podautoscaler/replica_calculator.go b/pkg/controller/podautoscaler/replica_calculator.go index a1eb82794f880..e20776c8c320e 100644 --- a/pkg/controller/podautoscaler/replica_calculator.go +++ b/pkg/controller/podautoscaler/replica_calculator.go @@ -22,7 +22,7 @@ import ( "time" autoscaling "k8s.io/api/autoscaling/v2beta2" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/sets" @@ -316,7 +316,7 @@ func (c *ReplicaCalculator) GetExternalMetricReplicas(currentReplicas int32, tar // GetExternalPerPodMetricReplicas calculates the desired replica count based on a // target metric value per pod (as a milli-value) for the external metric in the // given namespace, and the current replica count. -func (c *ReplicaCalculator) GetExternalPerPodMetricReplicas(currentReplicas int32, targetUtilizationPerPod int64, metricName, namespace string, metricSelector *metav1.LabelSelector) (replicaCount int32, utilization int64, timestamp time.Time, err error) { +func (c *ReplicaCalculator) GetExternalPerPodMetricReplicas(statusReplicas int32, targetUtilizationPerPod int64, metricName, namespace string, metricSelector *metav1.LabelSelector) (replicaCount int32, utilization int64, timestamp time.Time, err error) { metricLabelSelector, err := metav1.LabelSelectorAsSelector(metricSelector) if err != nil { return 0, 0, time.Time{}, err @@ -330,13 +330,13 @@ func (c *ReplicaCalculator) GetExternalPerPodMetricReplicas(currentReplicas int3 utilization = utilization + val } - replicaCount = currentReplicas + replicaCount = statusReplicas usageRatio := float64(utilization) / (float64(targetUtilizationPerPod) * float64(replicaCount)) if math.Abs(1.0-usageRatio) > c.tolerance { // update number of replicas if the change is large enough replicaCount = int32(math.Ceil(float64(utilization) / float64(targetUtilizationPerPod))) } - utilization = int64(math.Ceil(float64(utilization) / float64(currentReplicas))) + utilization = int64(math.Ceil(float64(utilization) / float64(statusReplicas))) return replicaCount, utilization, timestamp, nil } diff --git a/pkg/controller/podautoscaler/replica_calculator_test.go b/pkg/controller/podautoscaler/replica_calculator_test.go index ff71498278a69..392c0465531f8 100644 --- a/pkg/controller/podautoscaler/replica_calculator_test.go +++ b/pkg/controller/podautoscaler/replica_calculator_test.go @@ -23,7 +23,7 @@ import ( "time" autoscalingv2 "k8s.io/api/autoscaling/v2beta2" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/meta/testrestmapper" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/kubelet/kuberuntime/kuberuntime_manager.go b/pkg/kubelet/kuberuntime/kuberuntime_manager.go index 90039beda0942..c7c9799f039ae 100644 --- a/pkg/kubelet/kuberuntime/kuberuntime_manager.go +++ b/pkg/kubelet/kuberuntime/kuberuntime_manager.go @@ -465,11 +465,15 @@ func (m *kubeGenericRuntimeManager) computePodActions(pod *v1.Pod, podStatus *ku // If we need to (re-)create the pod sandbox, everything will need to be // killed and recreated, and init containers should be purged. if createPodSandbox { - if !shouldRestartOnFailure(pod) && attempt != 0 { + if !shouldRestartOnFailure(pod) && attempt != 0 && len(podStatus.ContainerStatuses) != 0 { // Should not restart the pod, just return. // we should not create a sandbox for a pod if it is already done. // if all containers are done and should not be started, there is no need to create a new sandbox. // this stops confusing logs on pods whose containers all have exit codes, but we recreate a sandbox before terminating it. + // + // If ContainerStatuses is empty, we assume that we've never + // successfully created any containers. In this case, we should + // retry creating the sandbox. changes.CreateSandbox = false return changes } diff --git a/pkg/kubelet/kuberuntime/kuberuntime_manager_test.go b/pkg/kubelet/kuberuntime/kuberuntime_manager_test.go index fc02734d0e921..f90697cf7f92e 100644 --- a/pkg/kubelet/kuberuntime/kuberuntime_manager_test.go +++ b/pkg/kubelet/kuberuntime/kuberuntime_manager_test.go @@ -385,7 +385,7 @@ func TestGetPods(t *testing.T) { assert.NoError(t, err) if !verifyPods(expected, actual) { - t.Errorf("expected %q, got %q", expected, actual) + t.Errorf("expected %#v, got %#v", expected, actual) } } @@ -929,6 +929,26 @@ func TestComputePodActions(t *testing.T) { ContainersToKill: map[kubecontainer.ContainerID]containerToKillInfo{}, }, }, + "Verify we create a pod sandbox if no ready sandbox for pod with RestartPolicy=Never and no containers have ever been created": { + mutatePodFn: func(pod *v1.Pod) { + pod.Spec.RestartPolicy = v1.RestartPolicyNever + }, + mutateStatusFn: func(status *kubecontainer.PodStatus) { + // no ready sandbox + status.SandboxStatuses[0].State = runtimeapi.PodSandboxState_SANDBOX_NOTREADY + status.SandboxStatuses[0].Metadata.Attempt = uint32(2) + // no visible containers + status.ContainerStatuses = []*kubecontainer.ContainerStatus{} + }, + actions: podActions{ + SandboxID: baseStatus.SandboxStatuses[0].Id, + Attempt: uint32(3), + CreateSandbox: true, + KillPod: true, + ContainersToStart: []int{0, 1, 2}, + ContainersToKill: map[kubecontainer.ContainerID]containerToKillInfo{}, + }, + }, } { pod, status := makeBasePodAndStatus() if test.mutatePodFn != nil { @@ -953,6 +973,17 @@ func getKillMap(pod *v1.Pod, status *kubecontainer.PodStatus, cIndexes []int) ma return m } +func getKillMapWithInitContainers(pod *v1.Pod, status *kubecontainer.PodStatus, cIndexes []int) map[kubecontainer.ContainerID]containerToKillInfo { + m := map[kubecontainer.ContainerID]containerToKillInfo{} + for _, i := range cIndexes { + m[status.ContainerStatuses[i].ID] = containerToKillInfo{ + container: &pod.Spec.InitContainers[i], + name: pod.Spec.InitContainers[i].Name, + } + } + return m +} + func verifyActions(t *testing.T, expected, actual *podActions, desc string) { if actual.ContainersToKill != nil { // Clear the message field since we don't need to verify the message. @@ -1047,6 +1078,36 @@ func TestComputePodActionsWithInitContainers(t *testing.T) { ContainersToKill: getKillMap(basePod, baseStatus, []int{}), }, }, + "Pod sandbox not ready, init container failed, but RestartPolicy == Never; kill pod only": { + mutatePodFn: func(pod *v1.Pod) { pod.Spec.RestartPolicy = v1.RestartPolicyNever }, + mutateStatusFn: func(status *kubecontainer.PodStatus) { + status.SandboxStatuses[0].State = runtimeapi.PodSandboxState_SANDBOX_NOTREADY + }, + actions: podActions{ + KillPod: true, + CreateSandbox: false, + SandboxID: baseStatus.SandboxStatuses[0].Id, + Attempt: uint32(1), + ContainersToStart: []int{}, + ContainersToKill: getKillMapWithInitContainers(basePod, baseStatus, []int{}), + }, + }, + "Pod sandbox not ready, and RestartPolicy == Never, but no visible init containers; create a new pod sandbox": { + mutatePodFn: func(pod *v1.Pod) { pod.Spec.RestartPolicy = v1.RestartPolicyNever }, + mutateStatusFn: func(status *kubecontainer.PodStatus) { + status.SandboxStatuses[0].State = runtimeapi.PodSandboxState_SANDBOX_NOTREADY + status.ContainerStatuses = []*kubecontainer.ContainerStatus{} + }, + actions: podActions{ + KillPod: true, + CreateSandbox: true, + SandboxID: baseStatus.SandboxStatuses[0].Id, + Attempt: uint32(1), + NextInitContainerToStart: &basePod.Spec.InitContainers[0], + ContainersToStart: []int{}, + ContainersToKill: getKillMapWithInitContainers(basePod, baseStatus, []int{}), + }, + }, } { pod, status := makeBasePodAndStatusWithInitContainers() if test.mutatePodFn != nil { diff --git a/pkg/kubelet/stats/cri_stats_provider.go b/pkg/kubelet/stats/cri_stats_provider.go index f3aeec0349de5..9b0bde1db79d7 100644 --- a/pkg/kubelet/stats/cri_stats_provider.go +++ b/pkg/kubelet/stats/cri_stats_provider.go @@ -686,7 +686,6 @@ func removeTerminatedPods(pods []*runtimeapi.PodSandbox) []*runtimeapi.PodSandbo result = append(result, refs[len(refs)-1]) } } - return result } diff --git a/pkg/proxy/ipvs/graceful_termination.go b/pkg/proxy/ipvs/graceful_termination.go index 712ba0377819b..1076fe4794d66 100644 --- a/pkg/proxy/ipvs/graceful_termination.go +++ b/pkg/proxy/ipvs/graceful_termination.go @@ -18,6 +18,7 @@ package ipvs import ( "fmt" + "strings" "sync" "time" @@ -167,7 +168,7 @@ func (m *GracefulTerminationManager) deleteRsFunc(rsToDelete *listItem) (bool, e // For UDP traffic, no graceful termination, we immediately delete the RS // (existing connections will be deleted on the next packet because sysctlExpireNoDestConn=1) // For other protocols, don't delete until all connections have expired) - if rsToDelete.VirtualServer.Protocol != "udp" && rs.ActiveConn+rs.InactiveConn != 0 { + if strings.ToUpper(rsToDelete.VirtualServer.Protocol) != "UDP" && rs.ActiveConn+rs.InactiveConn != 0 { klog.Infof("Not deleting, RS %v: %v ActiveConn, %v InactiveConn", rsToDelete.String(), rs.ActiveConn, rs.InactiveConn) return false, nil } diff --git a/pkg/util/mount/mount_linux.go b/pkg/util/mount/mount_linux.go index 2ab4d1059ed1a..9f0fe05ed4e4b 100644 --- a/pkg/util/mount/mount_linux.go +++ b/pkg/util/mount/mount_linux.go @@ -243,7 +243,7 @@ func (mounter *Mounter) IsLikelyNotMountPoint(file string) (bool, error) { if err != nil { return true, err } - rootStat, err := os.Lstat(filepath.Dir(strings.TrimSuffix(file, "/"))) + rootStat, err := os.Stat(filepath.Dir(strings.TrimSuffix(file, "/"))) if err != nil { return true, err } @@ -1120,7 +1120,7 @@ func doSafeMakeDir(pathname string, base string, perm os.FileMode) error { return fmt.Errorf("cannot create directory %s: %s", currentPath, err) } // Dive into the created directory - childFD, err := syscall.Openat(parentFD, dir, nofollowFlags, 0) + childFD, err = syscall.Openat(parentFD, dir, nofollowFlags, 0) if err != nil { return fmt.Errorf("cannot open %s: %s", currentPath, err) } diff --git a/pkg/volume/flexvolume/unmounter.go b/pkg/volume/flexvolume/unmounter.go index a62636aba4097..c6dfc6e7b572f 100644 --- a/pkg/volume/flexvolume/unmounter.go +++ b/pkg/volume/flexvolume/unmounter.go @@ -42,15 +42,15 @@ func (f *flexVolumeUnmounter) TearDown() error { } func (f *flexVolumeUnmounter) TearDownAt(dir string) error { - pathExists, pathErr := util.PathExists(dir) - if !pathExists { - klog.Warningf("Warning: Unmount skipped because path does not exist: %v", dir) - return nil - } - - if pathErr != nil && !util.IsCorruptedMnt(pathErr) { - return fmt.Errorf("Error checking path: %v", pathErr) + if pathErr != nil { + // only log warning here since plugins should anyways have to deal with errors + klog.Warningf("Error checking path: %v", pathErr) + } else { + if !pathExists { + klog.Warningf("Warning: Unmount skipped because path does not exist: %v", dir) + return nil + } } call := f.plugin.NewDriverCall(unmountCmd) diff --git a/plugin/pkg/admission/resourcequota/admission_test.go b/plugin/pkg/admission/resourcequota/admission_test.go index be7a8af6bb177..8b12751412f63 100644 --- a/plugin/pkg/admission/resourcequota/admission_test.go +++ b/plugin/pkg/admission/resourcequota/admission_test.go @@ -2163,3 +2163,93 @@ func TestAdmitLimitedScopeWithCoverQuota(t *testing.T) { } } + +// TestAdmitZeroDeltaUsageWithoutCoveringQuota verifies that resource quota is not required for zero delta requests. +func TestAdmitZeroDeltaUsageWithoutCoveringQuota(t *testing.T) { + + kubeClient := fake.NewSimpleClientset() + stopCh := make(chan struct{}) + defer close(stopCh) + + informerFactory := informers.NewSharedInformerFactory(kubeClient, controller.NoResyncPeriodFunc()) + quotaAccessor, _ := newQuotaAccessor() + quotaAccessor.client = kubeClient + quotaAccessor.lister = informerFactory.Core().V1().ResourceQuotas().Lister() + + // disable services unless there is a covering quota. + config := &resourcequotaapi.Configuration{ + LimitedResources: []resourcequotaapi.LimitedResource{ + { + Resource: "services", + MatchContains: []string{"services"}, + }, + }, + } + quotaConfiguration := install.NewQuotaConfigurationForAdmission() + evaluator := NewQuotaEvaluator(quotaAccessor, quotaConfiguration.IgnoredResources(), generic.NewRegistry(quotaConfiguration.Evaluators()), nil, config, 5, stopCh) + + handler := &QuotaAdmission{ + Handler: admission.NewHandler(admission.Create, admission.Update), + evaluator: evaluator, + } + + existingService := &api.Service{ + ObjectMeta: metav1.ObjectMeta{Name: "service", Namespace: "test", ResourceVersion: "1"}, + Spec: api.ServiceSpec{Type: api.ServiceTypeLoadBalancer}, + } + newService := &api.Service{ + ObjectMeta: metav1.ObjectMeta{Name: "service", Namespace: "test"}, + Spec: api.ServiceSpec{Type: api.ServiceTypeLoadBalancer}, + } + + err := handler.Validate(admission.NewAttributesRecord(newService, existingService, api.Kind("Service").WithVersion("version"), newService.Namespace, newService.Name, corev1.Resource("services").WithVersion("version"), "", admission.Update, false, nil)) + if err != nil { + t.Errorf("unexpected error: %v", err) + } +} + +// TestAdmitRejectDeltaUsageWithoutCoveringQuota verifies that resource quota is required for non zero delta requests. +func TestAdmitRejectDeltaUsageWithoutCoveringQuota(t *testing.T) { + kubeClient := fake.NewSimpleClientset() + stopCh := make(chan struct{}) + defer close(stopCh) + + informerFactory := informers.NewSharedInformerFactory(kubeClient, controller.NoResyncPeriodFunc()) + quotaAccessor, _ := newQuotaAccessor() + quotaAccessor.client = kubeClient + quotaAccessor.lister = informerFactory.Core().V1().ResourceQuotas().Lister() + + // disable services unless there is a covering quota. + config := &resourcequotaapi.Configuration{ + LimitedResources: []resourcequotaapi.LimitedResource{ + { + Resource: "services", + MatchContains: []string{"services"}, + }, + }, + } + quotaConfiguration := install.NewQuotaConfigurationForAdmission() + evaluator := NewQuotaEvaluator(quotaAccessor, quotaConfiguration.IgnoredResources(), generic.NewRegistry(quotaConfiguration.Evaluators()), nil, config, 5, stopCh) + + handler := &QuotaAdmission{ + Handler: admission.NewHandler(admission.Create, admission.Update), + evaluator: evaluator, + } + + existingService := &api.Service{ + ObjectMeta: metav1.ObjectMeta{Name: "service", Namespace: "test", ResourceVersion: "1"}, + Spec: api.ServiceSpec{Type: api.ServiceTypeLoadBalancer}, + } + newService := &api.Service{ + ObjectMeta: metav1.ObjectMeta{Name: "service", Namespace: "test"}, + Spec: api.ServiceSpec{ + Type: api.ServiceTypeNodePort, + Ports: []api.ServicePort{{Port: 1234}}, + }, + } + + err := handler.Validate(admission.NewAttributesRecord(newService, existingService, api.Kind("Service").WithVersion("version"), newService.Namespace, newService.Name, corev1.Resource("services").WithVersion("version"), "", admission.Update, false, nil)) + if err == nil { + t.Errorf("Expected an error for consuming a limited resource without quota.") + } +} diff --git a/plugin/pkg/admission/resourcequota/controller.go b/plugin/pkg/admission/resourcequota/controller.go index 13f46d1d5c965..cf792ee0196d8 100644 --- a/plugin/pkg/admission/resourcequota/controller.go +++ b/plugin/pkg/admission/resourcequota/controller.go @@ -470,29 +470,6 @@ func CheckRequest(quotas []corev1.ResourceQuota, a admission.Attributes, evaluat restrictedResourcesSet.Insert(localRestrictedResourcesSet.List()...) } - // verify that for every resource that had limited by default consumption - // enabled that there was a corresponding quota that covered its use. - // if not, we reject the request. - hasNoCoveringQuota := limitedResourceNamesSet.Difference(restrictedResourcesSet) - if len(hasNoCoveringQuota) > 0 { - return quotas, admission.NewForbidden(a, fmt.Errorf("insufficient quota to consume: %v", strings.Join(hasNoCoveringQuota.List(), ","))) - } - - // verify that for every scope that had limited access enabled - // that there was a corresponding quota that covered it. - // if not, we reject the request. - scopesHasNoCoveringQuota, err := evaluator.UncoveredQuotaScopes(limitedScopes, restrictedScopes) - if err != nil { - return quotas, err - } - if len(scopesHasNoCoveringQuota) > 0 { - return quotas, fmt.Errorf("insufficient quota to match these scopes: %v", scopesHasNoCoveringQuota) - } - - if len(interestingQuotaIndexes) == 0 { - return quotas, nil - } - // Usage of some resources cannot be counted in isolation. For example, when // the resource represents a number of unique references to external // resource. In such a case an evaluator needs to process other objects in @@ -539,6 +516,29 @@ func CheckRequest(quotas []corev1.ResourceQuota, a admission.Attributes, evaluat return quotas, nil } + // verify that for every resource that had limited by default consumption + // enabled that there was a corresponding quota that covered its use. + // if not, we reject the request. + hasNoCoveringQuota := limitedResourceNamesSet.Difference(restrictedResourcesSet) + if len(hasNoCoveringQuota) > 0 { + return quotas, admission.NewForbidden(a, fmt.Errorf("insufficient quota to consume: %v", strings.Join(hasNoCoveringQuota.List(), ","))) + } + + // verify that for every scope that had limited access enabled + // that there was a corresponding quota that covered it. + // if not, we reject the request. + scopesHasNoCoveringQuota, err := evaluator.UncoveredQuotaScopes(limitedScopes, restrictedScopes) + if err != nil { + return quotas, err + } + if len(scopesHasNoCoveringQuota) > 0 { + return quotas, fmt.Errorf("insufficient quota to match these scopes: %v", scopesHasNoCoveringQuota) + } + + if len(interestingQuotaIndexes) == 0 { + return quotas, nil + } + outQuotas, err := copyQuotas(quotas) if err != nil { return nil, err diff --git a/staging/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json b/staging/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json index 3d5b22080309b..3344316a68c8f 100644 --- a/staging/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json +++ b/staging/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json @@ -6,10 +6,6 @@ "./..." ], "Deps": [ - { - "ImportPath": "bitbucket.org/ww/goautoneg", - "Rev": "75cd24fc2f2c2a2088577d12123ddee5f54e0675" - }, { "ImportPath": "github.com/Azure/go-ansiterm", "Rev": "d6e3b3328b783f23731bc4d058875b0371ff8109" @@ -594,6 +590,10 @@ "ImportPath": "github.com/modern-go/reflect2", "Rev": "94122c33edd36123c84d5368cfb2b69df93a0ec8" }, + { + "ImportPath": "github.com/munnerz/goautoneg", + "Rev": "a547fc61f48d567d5b4ec6f8aee5573d8efce11d" + }, { "ImportPath": "github.com/pborman/uuid", "Rev": "ca53cad383cad2479bbba7f7a1a05797ec1386e4" @@ -2264,23 +2264,23 @@ }, { "ImportPath": "k8s.io/kube-openapi/pkg/builder", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/common", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/handler", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/util", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/util/proto", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/fuzzer", diff --git a/staging/src/k8s.io/apimachinery/Godeps/Godeps.json b/staging/src/k8s.io/apimachinery/Godeps/Godeps.json index a9c7a7f69fb49..d7a503b426a41 100644 --- a/staging/src/k8s.io/apimachinery/Godeps/Godeps.json +++ b/staging/src/k8s.io/apimachinery/Godeps/Godeps.json @@ -176,7 +176,7 @@ }, { "ImportPath": "k8s.io/kube-openapi/pkg/util/proto", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "sigs.k8s.io/yaml", diff --git a/staging/src/k8s.io/apiserver/Godeps/Godeps.json b/staging/src/k8s.io/apiserver/Godeps/Godeps.json index 5be0a83b78ef1..c034dbc029d2b 100644 --- a/staging/src/k8s.io/apiserver/Godeps/Godeps.json +++ b/staging/src/k8s.io/apiserver/Godeps/Godeps.json @@ -6,10 +6,6 @@ "./..." ], "Deps": [ - { - "ImportPath": "bitbucket.org/ww/goautoneg", - "Rev": "75cd24fc2f2c2a2088577d12123ddee5f54e0675" - }, { "ImportPath": "github.com/Azure/go-ansiterm", "Rev": "d6e3b3328b783f23731bc4d058875b0371ff8109" @@ -550,6 +546,10 @@ "ImportPath": "github.com/modern-go/reflect2", "Rev": "94122c33edd36123c84d5368cfb2b69df93a0ec8" }, + { + "ImportPath": "github.com/munnerz/goautoneg", + "Rev": "a547fc61f48d567d5b4ec6f8aee5573d8efce11d" + }, { "ImportPath": "github.com/pborman/uuid", "Rev": "ca53cad383cad2479bbba7f7a1a05797ec1386e4" @@ -1952,23 +1952,23 @@ }, { "ImportPath": "k8s.io/kube-openapi/pkg/builder", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/common", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/handler", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/util", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/util/proto", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/client-go/discovery", diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/BUILD b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/BUILD index a3f78ce935733..784fed6eb3c27 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/BUILD +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/BUILD @@ -29,7 +29,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/bitbucket.org/ww/goautoneg:go_default_library", + "//vendor/github.com/munnerz/goautoneg:go_default_library", ], ) diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/negotiate.go b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/negotiate.go index f9bb47babca96..7aadce7342956 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/negotiate.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/negotiate.go @@ -22,7 +22,7 @@ import ( "strconv" "strings" - "bitbucket.org/ww/goautoneg" + "github.com/munnerz/goautoneg" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/staging/src/k8s.io/apiserver/pkg/server/config_selfclient_test.go b/staging/src/k8s.io/apiserver/pkg/server/config_selfclient_test.go index 9374403ff9dcc..053ac4de02441 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/config_selfclient_test.go +++ b/staging/src/k8s.io/apiserver/pkg/server/config_selfclient_test.go @@ -59,7 +59,9 @@ func TestLoopbackHostPort(t *testing.T) { if err != nil { t.Fatalf("unexpected error: %v", err) } - if ip := net.ParseIP(host); ip == nil || !ip.IsLoopback() || ip.To4() != nil { + if host == "localhost" { + // can happen on machines without IPv6 + } else if ip := net.ParseIP(host); ip == nil || !ip.IsLoopback() || ip.To4() != nil { t.Fatalf("expected IPv6 host to be loopback, got %q", host) } diff --git a/staging/src/k8s.io/apiserver/pkg/server/healthz/doc.go b/staging/src/k8s.io/apiserver/pkg/server/healthz/doc.go index 06e67f6fe3cce..d938caa371392 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/healthz/doc.go +++ b/staging/src/k8s.io/apiserver/pkg/server/healthz/doc.go @@ -17,5 +17,5 @@ limitations under the License. // Package healthz implements basic http server health checking. // Usage: // import "k8s.io/apiserver/pkg/server/healthz" -// healthz.DefaultHealthz() +// healthz.InstallHandler(mux) package healthz // import "k8s.io/apiserver/pkg/server/healthz" diff --git a/staging/src/k8s.io/apiserver/pkg/server/healthz/healthz.go b/staging/src/k8s.io/apiserver/pkg/server/healthz/healthz.go index 17d85fbe637ed..d618c690fa4d7 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/healthz/healthz.go +++ b/staging/src/k8s.io/apiserver/pkg/server/healthz/healthz.go @@ -37,15 +37,6 @@ type HealthzChecker interface { Check(req *http.Request) error } -var defaultHealthz = sync.Once{} - -// DefaultHealthz installs the default healthz check to the http.DefaultServeMux. -func DefaultHealthz(checks ...HealthzChecker) { - defaultHealthz.Do(func() { - InstallHandler(http.DefaultServeMux, checks...) - }) -} - // PingHealthz returns true automatically when checked var PingHealthz HealthzChecker = ping{} diff --git a/staging/src/k8s.io/client-go/Godeps/Godeps.json b/staging/src/k8s.io/client-go/Godeps/Godeps.json index b78a348375a3e..f592e4538bbdd 100644 --- a/staging/src/k8s.io/client-go/Godeps/Godeps.json +++ b/staging/src/k8s.io/client-go/Godeps/Godeps.json @@ -612,7 +612,7 @@ }, { "ImportPath": "k8s.io/kube-openapi/pkg/util/proto", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "sigs.k8s.io/yaml", diff --git a/staging/src/k8s.io/csi-api/Godeps/Godeps.json b/staging/src/k8s.io/csi-api/Godeps/Godeps.json index c4392e7408531..b61a2bc4b6100 100644 --- a/staging/src/k8s.io/csi-api/Godeps/Godeps.json +++ b/staging/src/k8s.io/csi-api/Godeps/Godeps.json @@ -552,7 +552,7 @@ }, { "ImportPath": "k8s.io/kube-openapi/pkg/util/proto", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "sigs.k8s.io/yaml", diff --git a/staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json b/staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json index 738e715d1020e..fe74e198c732c 100644 --- a/staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json +++ b/staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json @@ -6,10 +6,6 @@ "./..." ], "Deps": [ - { - "ImportPath": "bitbucket.org/ww/goautoneg", - "Rev": "75cd24fc2f2c2a2088577d12123ddee5f54e0675" - }, { "ImportPath": "github.com/Azure/go-ansiterm", "Rev": "d6e3b3328b783f23731bc4d058875b0371ff8109" @@ -242,6 +238,10 @@ "ImportPath": "github.com/modern-go/reflect2", "Rev": "94122c33edd36123c84d5368cfb2b69df93a0ec8" }, + { + "ImportPath": "github.com/munnerz/goautoneg", + "Rev": "a547fc61f48d567d5b4ec6f8aee5573d8efce11d" + }, { "ImportPath": "github.com/mxk/go-flowrate/flowrate", "Rev": "cca7078d478f8520f85629ad7c68962d31ed7682" @@ -1828,27 +1828,27 @@ }, { "ImportPath": "k8s.io/kube-openapi/pkg/aggregator", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/builder", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/common", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/handler", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/util", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/util/proto", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "sigs.k8s.io/yaml", diff --git a/staging/src/k8s.io/metrics/Godeps/Godeps.json b/staging/src/k8s.io/metrics/Godeps/Godeps.json index 4529a59836544..8d8058670fc8e 100644 --- a/staging/src/k8s.io/metrics/Godeps/Godeps.json +++ b/staging/src/k8s.io/metrics/Godeps/Godeps.json @@ -524,7 +524,7 @@ }, { "ImportPath": "k8s.io/kube-openapi/pkg/util/proto", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "sigs.k8s.io/yaml", diff --git a/staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json b/staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json index 4712fdfd8c070..6826b41113aed 100644 --- a/staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json +++ b/staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json @@ -6,10 +6,6 @@ "./..." ], "Deps": [ - { - "ImportPath": "bitbucket.org/ww/goautoneg", - "Rev": "75cd24fc2f2c2a2088577d12123ddee5f54e0675" - }, { "ImportPath": "github.com/Azure/go-ansiterm", "Rev": "d6e3b3328b783f23731bc4d058875b0371ff8109" @@ -234,6 +230,10 @@ "ImportPath": "github.com/modern-go/reflect2", "Rev": "94122c33edd36123c84d5368cfb2b69df93a0ec8" }, + { + "ImportPath": "github.com/munnerz/goautoneg", + "Rev": "a547fc61f48d567d5b4ec6f8aee5573d8efce11d" + }, { "ImportPath": "github.com/pborman/uuid", "Rev": "ca53cad383cad2479bbba7f7a1a05797ec1386e4" @@ -1784,23 +1784,23 @@ }, { "ImportPath": "k8s.io/kube-openapi/pkg/builder", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/common", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/handler", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/util", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/util/proto", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "sigs.k8s.io/yaml", diff --git a/staging/src/k8s.io/sample-controller/Godeps/Godeps.json b/staging/src/k8s.io/sample-controller/Godeps/Godeps.json index ecb19d017a655..9b13f8a778d1f 100644 --- a/staging/src/k8s.io/sample-controller/Godeps/Godeps.json +++ b/staging/src/k8s.io/sample-controller/Godeps/Godeps.json @@ -1156,7 +1156,7 @@ }, { "ImportPath": "k8s.io/kube-openapi/pkg/util/proto", - "Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d" + "Rev": "fd52d7a69c206aae478f9aff43cb10eaf25e5c2a" }, { "ImportPath": "sigs.k8s.io/yaml", diff --git a/test/e2e/framework/deployment_util.go b/test/e2e/framework/deployment_util.go index a525d47ecc6e3..9c84aefdd80cf 100644 --- a/test/e2e/framework/deployment_util.go +++ b/test/e2e/framework/deployment_util.go @@ -107,8 +107,9 @@ func NewDeployment(deploymentName string, replicas int32, podLabels map[string]s TerminationGracePeriodSeconds: &zero, Containers: []v1.Container{ { - Name: imageName, - Image: image, + Name: imageName, + Image: image, + SecurityContext: &v1.SecurityContext{}, }, }, }, diff --git a/test/e2e/framework/jobs_util.go b/test/e2e/framework/jobs_util.go index e3acdac366122..e6c380a8421da 100644 --- a/test/e2e/framework/jobs_util.go +++ b/test/e2e/framework/jobs_util.go @@ -83,6 +83,7 @@ func NewTestJob(behavior, name string, rPol v1.RestartPolicy, parallelism, compl Name: "data", }, }, + SecurityContext: &v1.SecurityContext{}, }, }, }, diff --git a/test/e2e/framework/rs_util.go b/test/e2e/framework/rs_util.go index f206dc89fcab7..20faa655225a7 100644 --- a/test/e2e/framework/rs_util.go +++ b/test/e2e/framework/rs_util.go @@ -148,8 +148,9 @@ func NewReplicaSet(name, namespace string, replicas int32, podLabels map[string] Spec: v1.PodSpec{ Containers: []v1.Container{ { - Name: imageName, - Image: image, + Name: imageName, + Image: image, + SecurityContext: &v1.SecurityContext{}, }, }, }, diff --git a/test/e2e/framework/statefulset_utils.go b/test/e2e/framework/statefulset_utils.go index 4b295b58e6b0c..ee2ab89d73ca7 100644 --- a/test/e2e/framework/statefulset_utils.go +++ b/test/e2e/framework/statefulset_utils.go @@ -809,9 +809,10 @@ func NewStatefulSet(name, ns, governingSvcName string, replicas int32, statefulP Spec: v1.PodSpec{ Containers: []v1.Container{ { - Name: "nginx", - Image: imageutils.GetE2EImage(imageutils.Nginx), - VolumeMounts: mounts, + Name: "nginx", + Image: imageutils.GetE2EImage(imageutils.Nginx), + VolumeMounts: mounts, + SecurityContext: &v1.SecurityContext{}, }, }, Volumes: vols, diff --git a/test/e2e/network/dns_configmap.go b/test/e2e/network/dns_configmap.go index 5426daba44319..52418fda6e74d 100644 --- a/test/e2e/network/dns_configmap.go +++ b/test/e2e/network/dns_configmap.go @@ -35,7 +35,7 @@ type dnsFederationsConfigMapTest struct { } var ( - googleDnsHostname = "google-public-dns-a.google.com" + googleDnsHostname = "dns.google" // The ConfigMap update mechanism takes longer than the standard // wait.ForeverTestTimeout. moreForeverTestTimeout = 2 * 60 * time.Second diff --git a/test/e2e/upgrades/apps/daemonsets.go b/test/e2e/upgrades/apps/daemonsets.go index 3503700389101..70ae85a3342c5 100644 --- a/test/e2e/upgrades/apps/daemonsets.go +++ b/test/e2e/upgrades/apps/daemonsets.go @@ -60,9 +60,10 @@ func (t *DaemonSetUpgradeTest) Setup(f *framework.Framework) { Spec: v1.PodSpec{ Containers: []v1.Container{ { - Name: daemonSetName, - Image: image, - Ports: []v1.ContainerPort{{ContainerPort: 9376}}, + Name: daemonSetName, + Image: image, + Ports: []v1.ContainerPort{{ContainerPort: 9376}}, + SecurityContext: &v1.SecurityContext{}, }, }, }, diff --git a/test/images/crd-conversion-webhook/converter/BUILD b/test/images/crd-conversion-webhook/converter/BUILD index d3abb152edf5e..bc55307e79545 100644 --- a/test/images/crd-conversion-webhook/converter/BUILD +++ b/test/images/crd-conversion-webhook/converter/BUILD @@ -14,7 +14,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer/json:go_default_library", - "//vendor/bitbucket.org/ww/goautoneg:go_default_library", + "//vendor/github.com/munnerz/goautoneg:go_default_library", "//vendor/k8s.io/klog:go_default_library", ], ) diff --git a/test/images/crd-conversion-webhook/converter/framework.go b/test/images/crd-conversion-webhook/converter/framework.go index 3e20926b8e46f..180277ff6e447 100644 --- a/test/images/crd-conversion-webhook/converter/framework.go +++ b/test/images/crd-conversion-webhook/converter/framework.go @@ -17,12 +17,13 @@ limitations under the License. package converter import ( - "bitbucket.org/ww/goautoneg" "fmt" "io/ioutil" "net/http" "strings" + "github.com/munnerz/goautoneg" + "k8s.io/klog" "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" diff --git a/test/images/resource-consumer/consume-cpu/BUILD b/test/images/resource-consumer/consume-cpu/BUILD index f6671b52c5c07..a62dcdf3b1859 100644 --- a/test/images/resource-consumer/consume-cpu/BUILD +++ b/test/images/resource-consumer/consume-cpu/BUILD @@ -15,7 +15,7 @@ go_library( name = "go_default_library", srcs = ["consume_cpu.go"], importpath = "k8s.io/kubernetes/test/images/resource-consumer/consume-cpu", - deps = ["//vendor/bitbucket.org/bertimus9/systemstat:go_default_library"], + deps = ["//vendor/github.com/nikhita/systemstat:go_default_library"], ) filegroup( diff --git a/test/images/resource-consumer/consume-cpu/consume_cpu.go b/test/images/resource-consumer/consume-cpu/consume_cpu.go index 08a6dc986671f..8da0d2b1d977c 100644 --- a/test/images/resource-consumer/consume-cpu/consume_cpu.go +++ b/test/images/resource-consumer/consume-cpu/consume_cpu.go @@ -21,7 +21,7 @@ import ( "math" "time" - "bitbucket.org/bertimus9/systemstat" + "github.com/nikhita/systemstat" ) const sleep = time.Duration(10) * time.Millisecond diff --git a/test/kubemark/resources/manifests/kube-addon-manager.yaml b/test/kubemark/resources/manifests/kube-addon-manager.yaml index e9bc87e1eb63d..9a7a852476f21 100644 --- a/test/kubemark/resources/manifests/kube-addon-manager.yaml +++ b/test/kubemark/resources/manifests/kube-addon-manager.yaml @@ -9,7 +9,7 @@ spec: hostNetwork: true containers: - name: kube-addon-manager - image: {{kube_docker_registry}}/kube-addon-manager:v8.9 + image: {{kube_docker_registry}}/kube-addon-manager:v8.9.1 command: - /bin/bash - -c diff --git a/vendor/BUILD b/vendor/BUILD index 68e80ab1dae78..2965e350d59af 100644 --- a/vendor/BUILD +++ b/vendor/BUILD @@ -11,8 +11,6 @@ filegroup( name = "all-srcs", srcs = [ ":package-srcs", - "//vendor/bitbucket.org/bertimus9/systemstat:all-srcs", - "//vendor/bitbucket.org/ww/goautoneg:all-srcs", "//vendor/cloud.google.com/go/compute/metadata:all-srcs", "//vendor/cloud.google.com/go/internal:all-srcs", "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute:all-srcs", @@ -317,8 +315,10 @@ filegroup( "//vendor/github.com/modern-go/reflect2:all-srcs", "//vendor/github.com/mohae/deepcopy:all-srcs", "//vendor/github.com/mrunalp/fileutils:all-srcs", + "//vendor/github.com/munnerz/goautoneg:all-srcs", "//vendor/github.com/mvdan/xurls:all-srcs", "//vendor/github.com/mxk/go-flowrate/flowrate:all-srcs", + "//vendor/github.com/nikhita/systemstat:all-srcs", "//vendor/github.com/onsi/ginkgo:all-srcs", "//vendor/github.com/onsi/gomega:all-srcs", "//vendor/github.com/opencontainers/go-digest:all-srcs", diff --git a/vendor/bitbucket.org/ww/goautoneg/BUILD b/vendor/github.com/munnerz/goautoneg/BUILD similarity index 78% rename from vendor/bitbucket.org/ww/goautoneg/BUILD rename to vendor/github.com/munnerz/goautoneg/BUILD index ecb309b5ed408..fd31c6c004468 100644 --- a/vendor/bitbucket.org/ww/goautoneg/BUILD +++ b/vendor/github.com/munnerz/goautoneg/BUILD @@ -3,8 +3,8 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = ["autoneg.go"], - importmap = "k8s.io/kubernetes/vendor/bitbucket.org/ww/goautoneg", - importpath = "bitbucket.org/ww/goautoneg", + importmap = "k8s.io/kubernetes/vendor/github.com/munnerz/goautoneg", + importpath = "github.com/munnerz/goautoneg", visibility = ["//visibility:public"], ) diff --git a/vendor/bitbucket.org/ww/goautoneg/Makefile b/vendor/github.com/munnerz/goautoneg/Makefile similarity index 100% rename from vendor/bitbucket.org/ww/goautoneg/Makefile rename to vendor/github.com/munnerz/goautoneg/Makefile diff --git a/vendor/bitbucket.org/ww/goautoneg/README.txt b/vendor/github.com/munnerz/goautoneg/README.txt similarity index 100% rename from vendor/bitbucket.org/ww/goautoneg/README.txt rename to vendor/github.com/munnerz/goautoneg/README.txt diff --git a/vendor/bitbucket.org/ww/goautoneg/autoneg.go b/vendor/github.com/munnerz/goautoneg/autoneg.go similarity index 100% rename from vendor/bitbucket.org/ww/goautoneg/autoneg.go rename to vendor/github.com/munnerz/goautoneg/autoneg.go diff --git a/vendor/bitbucket.org/bertimus9/systemstat/.gitignore b/vendor/github.com/nikhita/systemstat/.gitignore similarity index 100% rename from vendor/bitbucket.org/bertimus9/systemstat/.gitignore rename to vendor/github.com/nikhita/systemstat/.gitignore diff --git a/vendor/bitbucket.org/bertimus9/systemstat/AUTHORS b/vendor/github.com/nikhita/systemstat/AUTHORS similarity index 100% rename from vendor/bitbucket.org/bertimus9/systemstat/AUTHORS rename to vendor/github.com/nikhita/systemstat/AUTHORS diff --git a/vendor/bitbucket.org/bertimus9/systemstat/BUILD b/vendor/github.com/nikhita/systemstat/BUILD similarity index 80% rename from vendor/bitbucket.org/bertimus9/systemstat/BUILD rename to vendor/github.com/nikhita/systemstat/BUILD index ac59981d1f886..9540bbdd5e8e8 100644 --- a/vendor/bitbucket.org/bertimus9/systemstat/BUILD +++ b/vendor/github.com/nikhita/systemstat/BUILD @@ -8,8 +8,8 @@ go_library( "systemstat_linux.go", "utils.go", ], - importmap = "k8s.io/kubernetes/vendor/bitbucket.org/bertimus9/systemstat", - importpath = "bitbucket.org/bertimus9/systemstat", + importmap = "k8s.io/kubernetes/vendor/github.com/nikhita/systemstat", + importpath = "github.com/nikhita/systemstat", visibility = ["//visibility:public"], ) diff --git a/vendor/bitbucket.org/bertimus9/systemstat/LICENSE b/vendor/github.com/nikhita/systemstat/LICENSE similarity index 100% rename from vendor/bitbucket.org/bertimus9/systemstat/LICENSE rename to vendor/github.com/nikhita/systemstat/LICENSE diff --git a/vendor/bitbucket.org/bertimus9/systemstat/Makefile b/vendor/github.com/nikhita/systemstat/Makefile similarity index 100% rename from vendor/bitbucket.org/bertimus9/systemstat/Makefile rename to vendor/github.com/nikhita/systemstat/Makefile diff --git a/vendor/bitbucket.org/bertimus9/systemstat/README.md b/vendor/github.com/nikhita/systemstat/README.md similarity index 100% rename from vendor/bitbucket.org/bertimus9/systemstat/README.md rename to vendor/github.com/nikhita/systemstat/README.md diff --git a/vendor/bitbucket.org/bertimus9/systemstat/VERSION b/vendor/github.com/nikhita/systemstat/VERSION similarity index 100% rename from vendor/bitbucket.org/bertimus9/systemstat/VERSION rename to vendor/github.com/nikhita/systemstat/VERSION diff --git a/vendor/bitbucket.org/bertimus9/systemstat/systemstat.go b/vendor/github.com/nikhita/systemstat/systemstat.go similarity index 100% rename from vendor/bitbucket.org/bertimus9/systemstat/systemstat.go rename to vendor/github.com/nikhita/systemstat/systemstat.go diff --git a/vendor/bitbucket.org/bertimus9/systemstat/systemstat_ex.go b/vendor/github.com/nikhita/systemstat/systemstat_ex.go similarity index 100% rename from vendor/bitbucket.org/bertimus9/systemstat/systemstat_ex.go rename to vendor/github.com/nikhita/systemstat/systemstat_ex.go diff --git a/vendor/bitbucket.org/bertimus9/systemstat/systemstat_linux.go b/vendor/github.com/nikhita/systemstat/systemstat_linux.go similarity index 100% rename from vendor/bitbucket.org/bertimus9/systemstat/systemstat_linux.go rename to vendor/github.com/nikhita/systemstat/systemstat_linux.go diff --git a/vendor/bitbucket.org/bertimus9/systemstat/utils.go b/vendor/github.com/nikhita/systemstat/utils.go similarity index 100% rename from vendor/bitbucket.org/bertimus9/systemstat/utils.go rename to vendor/github.com/nikhita/systemstat/utils.go diff --git a/vendor/k8s.io/kube-openapi/pkg/handler/BUILD b/vendor/k8s.io/kube-openapi/pkg/handler/BUILD index 15b1e639fb5e9..18993e30e9a16 100644 --- a/vendor/k8s.io/kube-openapi/pkg/handler/BUILD +++ b/vendor/k8s.io/kube-openapi/pkg/handler/BUILD @@ -7,13 +7,13 @@ go_library( importpath = "k8s.io/kube-openapi/pkg/handler", visibility = ["//visibility:public"], deps = [ - "//vendor/bitbucket.org/ww/goautoneg:go_default_library", "//vendor/github.com/NYTimes/gziphandler:go_default_library", "//vendor/github.com/emicklei/go-restful:go_default_library", "//vendor/github.com/go-openapi/spec:go_default_library", "//vendor/github.com/golang/protobuf/proto:go_default_library", "//vendor/github.com/googleapis/gnostic/OpenAPIv2:go_default_library", "//vendor/github.com/googleapis/gnostic/compiler:go_default_library", + "//vendor/github.com/munnerz/goautoneg:go_default_library", "//vendor/gopkg.in/yaml.v2:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/builder:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/common:go_default_library", diff --git a/vendor/k8s.io/kube-openapi/pkg/handler/handler.go b/vendor/k8s.io/kube-openapi/pkg/handler/handler.go index c4bbc0bff34fe..f4e64766a6783 100644 --- a/vendor/k8s.io/kube-openapi/pkg/handler/handler.go +++ b/vendor/k8s.io/kube-openapi/pkg/handler/handler.go @@ -28,8 +28,6 @@ import ( "sync" "time" - "bitbucket.org/ww/goautoneg" - yaml "gopkg.in/yaml.v2" "github.com/NYTimes/gziphandler" @@ -38,6 +36,7 @@ import ( "github.com/golang/protobuf/proto" openapi_v2 "github.com/googleapis/gnostic/OpenAPIv2" "github.com/googleapis/gnostic/compiler" + "github.com/munnerz/goautoneg" "k8s.io/kube-openapi/pkg/builder" "k8s.io/kube-openapi/pkg/common"